Changeset 772 for GPL/trunk/lib32/vsprintf.c
- Timestamp:
- Apr 19, 2025, 8:08:37 PM (4 months ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-6.6-LTS (added) merged: 765,768-769 /GPL/branches/uniaud32-exp (added) merged: 735-741,743-744,748-751,753-760,762-764 /GPL/branches/uniaud32-next merged: 718-734
- Property svn:mergeinfo changed
-
GPL/trunk/lib32/vsprintf.c
r32 r772 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.