diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-10-19 13:48:45 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-10-19 13:48:45 +0000 |
| commit | 118bb75e02bd6afdffea4b7242d312af5aa8d1ca (patch) | |
| tree | 41c0096e773cd451ad71989620a21f163084fa88 /lib/libc | |
| parent | f7383f14ae5fe845b35fe829b1b16112c9f611d3 (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/stdio/printf.3 | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index 1b3af2047588..00e00252a28a 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -678,14 +678,14 @@ To allocate a 128 byte string and print into it: #include <stdarg.h> char *newfmt(const char *fmt, ...) { - char *p; - va_list ap; - if ((p = malloc(128)) == NULL) - return (NULL); - va_start(ap, fmt); - (void) vsnprintf(p, 128, fmt, ap); - va_end(ap); - return (p); + char *p; + va_list ap; + if ((p = malloc(128)) == NULL) + return (NULL); + va_start(ap, fmt); + (void) vsnprintf(p, 128, fmt, ap); + va_end(ap); + return (p); } .Ed .Sh SECURITY CONSIDERATIONS |
