[PATCH 10/10] UML - Fix min usage

From: Jeff Dike
Date: Tue Mar 28 2006 - 17:56:50 EST


From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
type-safe min() in arch/um/drivers/mconsole_kern.c

Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Jeff Dike <jdike@xxxxxxxxxxx>

arch/um/drivers/mconsole_kern.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

Index: linux-2.6.16-mm/arch/um/drivers/mconsole_kern.c
===================================================================
--- linux-2.6.16-mm.orig/arch/um/drivers/mconsole_kern.c 2006-03-28 09:30:36.000000000 -0500
+++ linux-2.6.16-mm/arch/um/drivers/mconsole_kern.c 2006-03-28 09:40:36.000000000 -0500
@@ -616,7 +616,7 @@ static void console_write(struct console
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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/