libapparmor: Fix -Wunused-variable GCC warning

The variable was only referenced by commented section of code so move
the declaration into the comment.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
This commit is contained in:
Tyler Hicks 2016-02-01 09:40:22 -06:00
parent 38859cb204
commit f58c8e3b5c

View file

@ -928,7 +928,6 @@ int aa_query_link_path_len(const char *label, size_t label_len,
int *allowed, int *audited) int *allowed, int *audited)
{ {
autofree char *query = NULL; autofree char *query = NULL;
int rc;
/* + 1 for null separators */ /* + 1 for null separators */
size_t size = AA_QUERY_CMD_LABEL_SIZE + label_len + 1 + target_len + size_t size = AA_QUERY_CMD_LABEL_SIZE + label_len + 1 + target_len +
@ -950,7 +949,7 @@ int aa_query_link_path_len(const char *label, size_t label_len,
* trip to the kernel and adds a race on policy replacement between * trip to the kernel and adds a race on policy replacement between
* the two queries. * the two queries.
* *
rc = aa_query_label(AA_MAY_LINK, query, size, allowed, audited); int rc = aa_query_label(AA_MAY_LINK, query, size, allowed, audited);
if (rc || !*allowed) if (rc || !*allowed)
return rc; return rc;
*/ */