[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:
parent
43cecb3079
commit
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;
|
||||
|
|
Loading…
Reference in a new issue