Skip to content

Commit

Permalink
[PATCH] Audit: Fix the format type for size_t variables
Browse files Browse the repository at this point in the history
Fix the following compiler warning by using "%zu" as defined in C99.

  CC      kernel/auditsc.o
  kernel/auditsc.c: In function 'audit_log_single_execve_arg':
  kernel/auditsc.c:1074: warning: format '%ld' expects type 'long int', but
  argument 4 has type 'size_t'

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Paul Moore authored and Al Viro committed Mar 1, 2008
1 parent d395991 commit 422b03c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ static int audit_log_single_execve_arg(struct audit_context *context,
* so we can be sure nothing was lost.
*/
if ((i == 0) && (too_long))
audit_log_format(*ab, "a%d_len=%ld ", arg_num,
audit_log_format(*ab, "a%d_len=%zu ", arg_num,
has_cntl ? 2*len : len);

/*
Expand Down

0 comments on commit 422b03c

Please sign in to comment.