diff options
author | Steve Grubb <sgrubb@redhat.com> | 2005-04-29 16:09:52 +0100 |
---|---|---|
committer | <dwmw2@shinybook.infradead.org> | 2005-04-29 16:09:52 +0100 |
commit | d812ddbb89e323d054a7d073466225966c8350c8 (patch) | |
tree | 469e3e7bb7d1ca450059fc1b45660b8bc6452dc7 /kernel/audit.c | |
parent | 2fd6f58ba6efc82ea2c9c2630f7ff5ed9eeaf34a (diff) | |
download | linux-d812ddbb89e323d054a7d073466225966c8350c8.tar.gz linux-d812ddbb89e323d054a7d073466225966c8350c8.tar.bz2 linux-d812ddbb89e323d054a7d073466225966c8350c8.zip |
[AUDIT] Fix signedness of 'serial' in various routines.
Attached is a patch that corrects a signed/unsigned warning. I also noticed
that we needlessly init serial to 0. That only needs to occur if the kernel
was compiled without the audit system.
-Steve Grubb
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'kernel/audit.c')
-rw-r--r-- | kernel/audit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index e7bff8000d23..aa35422c0c42 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -620,7 +620,7 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx) struct audit_buffer *ab = NULL; unsigned long flags; struct timespec t; - int serial = 0; + unsigned int serial; if (!audit_initialized) return NULL; @@ -669,8 +669,10 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx) audit_get_stamp(ab->ctx, &t, &serial); else #endif + { t = CURRENT_TIME; - + serial = 0; + } audit_log_format(ab, "audit(%lu.%03lu:%u): ", t.tv_sec, t.tv_nsec/1000000, serial); return ab; |