[PATCH] uml: fix min usage
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 31 Mar 2006 10:30:17 +0000 (02:30 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 31 Mar 2006 20:18:51 +0000 (12:18 -0800)
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>
arch/um/drivers/mconsole_kern.c

index d060fce4940ed7a4989ad1ec9dc8e432a1b3c316..28e3760e8b981ed20d1f46453c8405dbfc31bd42 100644 (file)
@@ -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;