瀏覽代碼

[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>
Cordelia 16 年之前
父節點
當前提交
c4bacefb7a
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      kernel/auditsc.c

+ 2 - 1
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) &&