From: Al Viro Date: Fri, 31 Mar 2006 10:30:17 +0000 (-0800) Subject: [PATCH] uml: fix min usage X-Git-Tag: v2.6.17-rc1~110 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e11c0cdf4c6f7976e6f4fe221369a7b420245389;p=linux-2.6 [PATCH] uml: fix min usage type-safe min() in arch/um/drivers/mconsole_kern.c Signed-off-by: Al Viro Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index d060fce494..28e3760e8b 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c @@ -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;