浏览代码

x86: early_printk - use sizeof instead of hardcoded number

Impact: cleanup

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cyrill Gorcunov 16 年之前
父节点
当前提交
c64d8996bd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/x86/kernel/early_printk.c

+ 1 - 1
arch/x86/kernel/early_printk.c

@@ -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);
 }