AUDIT: fix max_t thinko.
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>
Fri, 13 May 2005 17:50:33 +0000 (18:50 +0100)
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>
Fri, 13 May 2005 17:50:33 +0000 (18:50 +0100)
Der... if you use max_t it helps if you give it a type.

Note to self: Always just apply the tested patches, don't try to port
them by hand. You're not clever enough.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
kernel/audit.c

index 74779d3..a0e33b6 100644 (file)
@@ -703,7 +703,7 @@ static void audit_log_vformat(struct audit_buffer *ab, const char *fmt,
                /* The printk buffer is 1024 bytes long, so if we get
                 * here and AUDIT_BUFSIZ is at least 1024, then we can
                 * log everything that printk could have logged. */
-               avail = audit_expand(ab, max_t(AUDIT_BUFSIZ, 1+len-avail));
+               avail = audit_expand(ab, max_t(unsigned, AUDIT_BUFSIZ, 1+len-avail));
                if (!avail)
                        goto out;
                len = vsnprintf(skb->tail, avail, fmt, args2);