提交 e11c0cdf 编写于 作者: A Al Viro 提交者: Linus Torvalds

[PATCH] uml: fix min usage

type-safe min() in arch/um/drivers/mconsole_kern.c
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NJeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 43cecb30
...@@ -616,7 +616,7 @@ static void console_write(struct console *console, const char *string, ...@@ -616,7 +616,7 @@ static void console_write(struct console *console, const char *string,
return; return;
while(1){ while(1){
n = min(len, ARRAY_SIZE(console_buf) - console_index); n = min((size_t)len, ARRAY_SIZE(console_buf) - console_index);
strncpy(&console_buf[console_index], string, n); strncpy(&console_buf[console_index], string, n);
console_index += n; console_index += n;
string += n; string += n;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册