Commit c4bacefb7aaf49da11a695f29d85d40909f17693
Committed by
Al Viro
1 parent
bef69ea0dc
Exists in
master
and in
7 other branches
[PATCH] audit: Moved variable declaration to beginning of function
got rid of compilation warning: ISO C90 forbids mixed declarations and code Signed-off-by: Cordelia Sam <cordesam@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
kernel/auditsc.c
... | ... | @@ -243,10 +243,11 @@ |
243 | 243 | |
244 | 244 | static int audit_match_perm(struct audit_context *ctx, int mask) |
245 | 245 | { |
246 | + unsigned n; | |
246 | 247 | if (unlikely(!ctx)) |
247 | 248 | return 0; |
248 | 249 | |
249 | - unsigned n = ctx->major; | |
250 | + n = ctx->major; | |
250 | 251 | switch (audit_classify_syscall(ctx->arch, n)) { |
251 | 252 | case 0: /* native */ |
252 | 253 | if ((mask & AUDIT_PERM_WRITE) && |