From: Brian Gerst <bgerst@didntduck.org>
To: Andrew Morton <akpm@osdl.org>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] vsprintf.c cleanups
Date: Thu, 24 Feb 2005 18:16:38 -0500 [thread overview]
Message-ID: <421E6056.7010901@didntduck.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 207 bytes --]
- Make sprintf call vsnprintf directly
- use INT_MAX for sprintf and vsprintf
Signed-off-by: Brian Gerst <bgerst@didntduck.org>
vsprintf.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
[-- Attachment #2: vsprintf.diff --]
[-- Type: text/plain, Size: 555 bytes --]
diff -urN linux-2.6.11-rc5/lib/vsprintf.c linux/lib/vsprintf.c
--- linux-2.6.11-rc5/lib/vsprintf.c 2004-08-24 08:43:15.000000000 -0400
+++ linux/lib/vsprintf.c 2005-02-24 17:59:28.000000000 -0500
@@ -580,7 +580,7 @@
*/
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 i;
va_start(args, fmt);
- i=vsprintf(buf,fmt,args);
+ i=vsnprintf(buf, INT_MAX, fmt, args);
va_end(args);
return i;
}
next reply other threads:[~2005-02-24 23:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-24 23:16 Brian Gerst [this message]
2005-02-25 0:59 ` [PATCH] vsprintf.c cleanups Horst von Brand
2005-02-25 12:28 ` Brian Gerst
2005-02-25 12:34 ` Arjan van de Ven
2005-02-25 13:37 ` Horst von Brand
2005-02-27 8:12 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=421E6056.7010901@didntduck.org \
--to=bgerst@didntduck.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox