From: Cordelia Date: Mon, 18 Aug 2008 16:45:51 +0000 (-0700) Subject: [PATCH] audit: Moved variable declaration to beginning of function X-Git-Tag: v2.6.27-rc6~78^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4bacefb7aaf49da11a695f29d85d40909f17693;p=linux-2.6 [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 Signed-off-by: Al Viro --- diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 972f8e61d3..59cedfb040 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -243,10 +243,11 @@ static inline int open_arg(int flags, int mask) static int audit_match_perm(struct audit_context *ctx, int mask) { + unsigned n; if (unlikely(!ctx)) return 0; - unsigned n = ctx->major; + n = ctx->major; switch (audit_classify_syscall(ctx->arch, n)) { case 0: /* native */ if ((mask & AUDIT_PERM_WRITE) &&