aboutsummaryrefslogtreecommitdiffstats
path: root/lib/vsprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r--lib/vsprintf.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index bed7229378f2..b025864d2e43 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -247,12 +247,12 @@ static char * number(char * buf, char * end, unsigned long long num, int base, i
247 * be generated for the given input, excluding the trailing 247 * be generated for the given input, excluding the trailing
248 * '\0', as per ISO C99. If you want to have the exact 248 * '\0', as per ISO C99. If you want to have the exact
249 * number of characters written into @buf as return value 249 * number of characters written into @buf as return value
250 * (not including the trailing '\0'), use vscnprintf. If the 250 * (not including the trailing '\0'), use vscnprintf(). If the
251 * return is greater than or equal to @size, the resulting 251 * return is greater than or equal to @size, the resulting
252 * string is truncated. 252 * string is truncated.
253 * 253 *
254 * Call this function if you are already dealing with a va_list. 254 * Call this function if you are already dealing with a va_list.
255 * You probably want snprintf instead. 255 * You probably want snprintf() instead.
256 */ 256 */
257int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) 257int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
258{ 258{
@@ -509,7 +509,7 @@ EXPORT_SYMBOL(vsnprintf);
509 * returns 0. 509 * returns 0.
510 * 510 *
511 * Call this function if you are already dealing with a va_list. 511 * Call this function if you are already dealing with a va_list.
512 * You probably want scnprintf instead. 512 * You probably want scnprintf() instead.
513 */ 513 */
514int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) 514int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
515{ 515{
@@ -554,8 +554,7 @@ EXPORT_SYMBOL(snprintf);
554 * @...: Arguments for the format string 554 * @...: Arguments for the format string
555 * 555 *
556 * The return value is the number of characters written into @buf not including 556 * The return value is the number of characters written into @buf not including
557 * the trailing '\0'. If @size is <= 0 the function returns 0. If the return is 557 * the trailing '\0'. If @size is <= 0 the function returns 0.
558 * greater than or equal to @size, the resulting string is truncated.
559 */ 558 */
560 559
561int scnprintf(char * buf, size_t size, const char *fmt, ...) 560int scnprintf(char * buf, size_t size, const char *fmt, ...)
@@ -577,11 +576,11 @@ EXPORT_SYMBOL(scnprintf);
577 * @args: Arguments for the format string 576 * @args: Arguments for the format string
578 * 577 *
579 * The function returns the number of characters written 578 * The function returns the number of characters written
580 * into @buf. Use vsnprintf or vscnprintf in order to avoid 579 * into @buf. Use vsnprintf() or vscnprintf() in order to avoid
581 * buffer overflows. 580 * buffer overflows.
582 * 581 *
583 * Call this function if you are already dealing with a va_list. 582 * Call this function if you are already dealing with a va_list.
584 * You probably want sprintf instead. 583 * You probably want sprintf() instead.
585 */ 584 */
586int vsprintf(char *buf, const char *fmt, va_list args) 585int vsprintf(char *buf, const char *fmt, va_list args)
587{ 586{
@@ -597,7 +596,7 @@ EXPORT_SYMBOL(vsprintf);
597 * @...: Arguments for the format string 596 * @...: Arguments for the format string
598 * 597 *
599 * The function returns the number of characters written 598 * The function returns the number of characters written
600 * into @buf. Use snprintf or scnprintf in order to avoid 599 * into @buf. Use snprintf() or scnprintf() in order to avoid
601 * buffer overflows. 600 * buffer overflows.
602 */ 601 */
603int sprintf(char * buf, const char *fmt, ...) 602int sprintf(char * buf, const char *fmt, ...)