public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] trivial: make comment about vs{n,cn,}printf more understandable
@ 2010-11-23 16:12 Uwe Kleine-König
  2010-11-24  3:04 ` Milton Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Uwe Kleine-König @ 2010-11-23 16:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: trivial, Steven Rostedt, Will Schmidt

"You probably want ... instead." sounds like a recommendation better
not to use the v... functions.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 lib/vsprintf.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index c150d3d..ec43171 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1279,8 +1279,7 @@ qualifier:
  * return is greater than or equal to @size, the resulting
  * string is truncated.
  *
- * Call this function if you are already dealing with a va_list.
- * You probably want snprintf() instead.
+ * If you're not already dealing with a va_list better use snprintf().
  */
 int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
 {
@@ -1454,8 +1453,7 @@ EXPORT_SYMBOL(vsnprintf);
  * the @buf not including the trailing '\0'. If @size is <= 0 the function
  * returns 0.
  *
- * Call this function if you are already dealing with a va_list.
- * You probably want scnprintf() instead.
+ * If you're not already dealing with a va_list better use scnprintf().
  *
  * See the vsnprintf() documentation for format string extensions over C99.
  */
@@ -1534,8 +1532,7 @@ EXPORT_SYMBOL(scnprintf);
  * into @buf. Use vsnprintf() or vscnprintf() in order to avoid
  * buffer overflows.
  *
- * Call this function if you are already dealing with a va_list.
- * You probably want sprintf() instead.
+ * If you're not already dealing with a va_list better use sprintf().
  *
  * See the vsnprintf() documentation for format string extensions over C99.
  */
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-06 14:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-23 16:12 [PATCH] trivial: make comment about vs{n,cn,}printf more understandable Uwe Kleine-König
2010-11-24  3:04 ` Milton Miller
2010-11-24  3:20   ` Steven Rostedt
2010-11-24 15:27     ` Will Schmidt
2010-11-24 19:10   ` [PATCH v2] " Uwe Kleine-König
2011-04-06 14:34     ` Uwe Kleine-König
2011-04-06 14:37       ` Jiri Kosina

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