Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba1835eb authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Jiri Kosina
Browse files

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 5a3016a6
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -1301,8 +1301,7 @@ int format_decode(const char *fmt, struct printf_spec *spec)
 * 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 consider using snprintf().
 */
int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
{
@@ -1476,8 +1475,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 consider using scnprintf().
 *
 * See the vsnprintf() documentation for format string extensions over C99.
 */
@@ -1556,8 +1554,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 consider using sprintf().
 *
 * See the vsnprintf() documentation for format string extensions over C99.
 */