diff options
| author | Brian Gerst <bgerst@didntduck.org> | 2005-03-13 00:48:29 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-03-13 00:48:29 -0800 |
| commit | dce252ce374127447c32d7ee58de6fef9b41d60a (patch) | |
| tree | 960a04c826d7c58d54635a4eb63b175befb5ad85 /lib/vsprintf.c | |
| parent | 52eab33a0834327ce22c3298981cf685e261c409 (diff) | |
[PATCH] vsprintf.c cleanups
- 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>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'lib/vsprintf.c')
| -rw-r--r-- | lib/vsprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 0b0935915066..a9bda0a361f3 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -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; } |
