From: Brian Gerst <bgerst@didntduck.org>

- Make sprintf call vsnprintf directly
- use INT_MAX for sprintf and vsprintf

Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/lib/vsprintf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN lib/vsprintf.c~vsprintfc-cleanups lib/vsprintf.c
--- 25/lib/vsprintf.c~vsprintfc-cleanups	2005-02-24 21:09:04.000000000 -0800
+++ 25-akpm/lib/vsprintf.c	2005-02-24 21:09:04.000000000 -0800
@@ -580,7 +580,7 @@ EXPORT_SYMBOL(scnprintf);
  */
 int vsprintf(char *buf, const char *fmt, va_list args)
 {
-	return vsnprintf(buf, (~0U)>>1, fmt, args);
+	return vsnprintf(buf, INT_MAX, fmt, args);
 }
 
 EXPORT_SYMBOL(vsprintf);
@@ -601,7 +601,7 @@ int sprintf(char * buf, const char *fmt,
 	int i;
 
 	va_start(args, fmt);
-	i=vsprintf(buf,fmt,args);
+	i=vsnprintf(buf, INT_MAX, fmt, args);
 	va_end(args);
 	return i;
 }
_