2006-03-28 22:59:34

by Jeff Dike

[permalink] [raw]
Subject: [PATCH 10/10] UML - Fix min usage

From: Al Viro <[email protected]>
type-safe min() in arch/um/drivers/mconsole_kern.c

Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Jeff Dike <[email protected]>

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;