linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] [PATCH 10/10] UML - Fix min usage
@ 2006-03-28 23:00 Jeff Dike
  0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2006-03-28 23:00 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, user-mode-linux-devel, viro

From: Al Viro <viro@zeniv.linux.org.uk>
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>

 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;



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-28 22:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-28 23:00 [uml-devel] [PATCH 10/10] UML - Fix min usage Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox