diff options
| author | James Morris <jmorris@namei.org> | 2011-08-28 21:43:02 -0400 |
|---|---|---|
| committer | James Morris <jmorris@namei.org> | 2011-09-09 19:56:28 -0400 |
| commit | 7ee95850bab6468f8213f36a84e872418d2faa00 (patch) | |
| tree | d8502d9362912b1da4afa68156a9ad29c7787323 | |
| parent | 32c3df631bc018109136a8f4f941ad591e76a0aa (diff) | |
apparmor: sparse fix: rename shadowed variables in policy_unpack.c
Fix the following warnings:
security/apparmor/policy_unpack.c:384:35: warning: symbol 'size' shadows an earlier one
security/apparmor/policy_unpack.c:370:24: originally declared here
security/apparmor/policy_unpack.c:443:29: warning: symbol 'tmp' shadows an earlier one
security/apparmor/policy_unpack.c:434:21: originally declared here
Signed-off-by: James Morris <jmorris@namei.org>
Acked-by: John Johansen <john.johansen@canonical.com>
| -rw-r--r-- | security/apparmor/policy_unpack.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c index d6d9a57b5652..741dd13e089b 100644 --- a/security/apparmor/policy_unpack.c +++ b/security/apparmor/policy_unpack.c | |||
| @@ -381,11 +381,11 @@ static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile) | |||
| 381 | profile->file.trans.size = size; | 381 | profile->file.trans.size = size; |
| 382 | for (i = 0; i < size; i++) { | 382 | for (i = 0; i < size; i++) { |
| 383 | char *str; | 383 | char *str; |
| 384 | int c, j, size = unpack_strdup(e, &str, NULL); | 384 | int c, j, size2 = unpack_strdup(e, &str, NULL); |
| 385 | /* unpack_strdup verifies that the last character is | 385 | /* unpack_strdup verifies that the last character is |
| 386 | * null termination byte. | 386 | * null termination byte. |
| 387 | */ | 387 | */ |
| 388 | if (!size) | 388 | if (!size2) |
| 389 | goto fail; | 389 | goto fail; |
| 390 | profile->file.trans.table[i] = str; | 390 | profile->file.trans.table[i] = str; |
| 391 | /* verify that name doesn't start with space */ | 391 | /* verify that name doesn't start with space */ |
| @@ -393,7 +393,7 @@ static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile) | |||
| 393 | goto fail; | 393 | goto fail; |
| 394 | 394 | ||
| 395 | /* count internal # of internal \0 */ | 395 | /* count internal # of internal \0 */ |
| 396 | for (c = j = 0; j < size - 2; j++) { | 396 | for (c = j = 0; j < size2 - 2; j++) { |
| 397 | if (!str[j]) | 397 | if (!str[j]) |
| 398 | c++; | 398 | c++; |
| 399 | } | 399 | } |
| @@ -440,11 +440,11 @@ static bool unpack_rlimits(struct aa_ext *e, struct aa_profile *profile) | |||
| 440 | if (size > RLIM_NLIMITS) | 440 | if (size > RLIM_NLIMITS) |
| 441 | goto fail; | 441 | goto fail; |
| 442 | for (i = 0; i < size; i++) { | 442 | for (i = 0; i < size; i++) { |
| 443 | u64 tmp = 0; | 443 | u64 tmp2 = 0; |
| 444 | int a = aa_map_resource(i); | 444 | int a = aa_map_resource(i); |
| 445 | if (!unpack_u64(e, &tmp, NULL)) | 445 | if (!unpack_u64(e, &tmp2, NULL)) |
| 446 | goto fail; | 446 | goto fail; |
| 447 | profile->rlimits.limits[a].rlim_max = tmp; | 447 | profile->rlimits.limits[a].rlim_max = tmp2; |
| 448 | } | 448 | } |
| 449 | if (!unpack_nameX(e, AA_ARRAYEND, NULL)) | 449 | if (!unpack_nameX(e, AA_ARRAYEND, NULL)) |
| 450 | goto fail; | 450 | goto fail; |
