From: Al Viro Date: Fri, 31 Mar 2006 10:30:17 +0000 (-0800) Subject: [PATCH] uml: fix min usage X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e11c0cdf4c6f7976e6f4fe221369a7b420245389;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 d060fce4940e..28e3760e8b98 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;