x86: early_printk - use sizeof instead of hardcoded number
authorCyrill Gorcunov <gorcunov@gmail.com>
Fri, 2 Jan 2009 08:27:18 +0000 (11:27 +0300)
committerIngo Molnar <mingo@elte.hu>
Fri, 2 Jan 2009 09:27:46 +0000 (10:27 +0100)
Impact: cleanup

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/early_printk.c

index 23b138e..504ad19 100644 (file)
@@ -886,7 +886,7 @@ asmlinkage void early_printk(const char *fmt, ...)
        va_list ap;
 
        va_start(ap, fmt);
-       n = vscnprintf(buf, 512, fmt, ap);
+       n = vscnprintf(buf, sizeof(buf), fmt, ap);
        early_console->write(early_console, buf, n);
        va_end(ap);
 }