[PATCH] uml: fix min usage
type-safe min() in arch/um/drivers/mconsole_kern.c Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Родитель
43cecb3079
Коммит
e11c0cdf4c
|
@ -616,7 +616,7 @@ static void console_write(struct console *console, const char *string,
|
|||
return;
|
||||
|
||||
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);
|
||||
console_index += n;
|
||||
string += n;
|
||||
|
|
Загрузка…
Ссылка в новой задаче