Skip to content

Commit

Permalink
[PATCH] audit: Moved variable declaration to beginning of function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Cordelia authored and Al Viro committed Sep 2, 2008
1 parent bef69ea commit c4bacef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) &&
Expand Down

0 comments on commit c4bacef

Please sign in to comment.