Changeset 750 for GPL/branches/uniaud32-exp/lib32/vsprintf.c
- Timestamp:
- Oct 3, 2022, 4:24:46 AM (3 years ago)
- File:
-
- 1 edited
-
GPL/branches/uniaud32-exp/lib32/vsprintf.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-exp/lib32/vsprintf.c
r32 r750 32 32 33 33 #include <stdarg.h> 34 34 #include <linux/kernel.h> 35 35 36 36 … … 366 366 } 367 367 368 /** 369 * vscnprintf - Format a string and place it in a buffer 370 * @buf: The buffer to place the result into 371 * @size: The size of the buffer, including the trailing null space 372 * @fmt: The format string to use 373 * @args: Arguments for the format string 374 * 375 * The return value is the number of characters which have been written into 376 * the @buf not including the trailing '\0'. If @size is == 0 the function 377 * returns 0. 378 * 379 * If you're not already dealing with a va_list consider using scnprintf(). 380 * 381 * See the vsnprintf() documentation for format string extensions over C99. 382 */ 383 int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) 384 { 385 int i; 386 387 if (unlikely(!size)) 388 return 0; 389 390 i = vsnprintf(buf, size, fmt, args); 391 392 if (likely(i < size)) 393 return i; 394 395 return size - 1; 396 }
Note:
See TracChangeset
for help on using the changeset viewer.
