aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2011-04-06 10:49:04 -0400
committerJiri Kosina <jkosina@suse.cz>2011-04-06 10:49:04 -0400
commitba1835eb30a80a0e8a1c33724735f3a99a957cff (patch)
tree8ff962d903dcf0c49d6547703e61b7e0f3a56680 /lib
parent5a3016a61530ea171c1b8ab23d7f651de919e39f (diff)
vsprintf: make comment about vs{n,cn,}printf more understandable
"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> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'lib')
-rw-r--r--lib/vsprintf.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index d3023df8477..bba9caa375d 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1301,8 +1301,7 @@ qualifier:
1301 * return is greater than or equal to @size, the resulting 1301 * return is greater than or equal to @size, the resulting
1302 * string is truncated. 1302 * string is truncated.
1303 * 1303 *
1304 * Call this function if you are already dealing with a va_list. 1304 * If you're not already dealing with a va_list consider using snprintf().
1305 * You probably want snprintf() instead.
1306 */ 1305 */
1307int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) 1306int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
1308{ 1307{
@@ -1476,8 +1475,7 @@ EXPORT_SYMBOL(vsnprintf);
1476 * the @buf not including the trailing '\0'. If @size is == 0 the function 1475 * the @buf not including the trailing '\0'. If @size is == 0 the function
1477 * returns 0. 1476 * returns 0.
1478 * 1477 *
1479 * Call this function if you are already dealing with a va_list. 1478 * If you're not already dealing with a va_list consider using scnprintf().
1480 * You probably want scnprintf() instead.
1481 * 1479 *
1482 * See the vsnprintf() documentation for format string extensions over C99. 1480 * See the vsnprintf() documentation for format string extensions over C99.
1483 */ 1481 */
@@ -1556,8 +1554,7 @@ EXPORT_SYMBOL(scnprintf);
1556 * into @buf. Use vsnprintf() or vscnprintf() in order to avoid 1554 * into @buf. Use vsnprintf() or vscnprintf() in order to avoid
1557 * buffer overflows. 1555 * buffer overflows.
1558 * 1556 *
1559 * Call this function if you are already dealing with a va_list. 1557 * If you're not already dealing with a va_list consider using sprintf().
1560 * You probably want sprintf() instead.
1561 * 1558 *
1562 * See the vsnprintf() documentation for format string extensions over C99. 1559 * See the vsnprintf() documentation for format string extensions over C99.
1563 */ 1560 */