Skip to content

Commit c4bacef

Browse files
CordeliaAl Viro
authored andcommitted
[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>
1 parent bef69ea commit c4bacef

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎kernel/auditsc.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,11 @@ static inline int open_arg(int flags, int mask)
243243

244244
static int audit_match_perm(struct audit_context *ctx, int mask)
245245
{
246+
unsigned n;
246247
if (unlikely(!ctx))
247248
return 0;
248249

249-
unsigned n = ctx->major;
250+
n = ctx->major;
250251
switch (audit_classify_syscall(ctx->arch, n)) {
251252
case 0: /* native */
252253
if ((mask & AUDIT_PERM_WRITE) &&

0 commit comments

Comments
 (0)