diff options
author | 1998-01-12 06:14:30 +0000 | |
---|---|---|
committer | 1998-01-12 06:14:30 +0000 | |
commit | a4a741f7cfab4f58efbc70e19b70b498c81b0748 (patch) | |
tree | 5100f22859b08302417ecb5fd5612e93cf0ae7d6 /lib/libc/stdio/asprintf.c | |
parent | cvs server: nothing known about share/man/man8/rc.conf.8 (diff) | |
download | wireguard-openbsd-a4a741f7cfab4f58efbc70e19b70b498c81b0748.tar.xz wireguard-openbsd-a4a741f7cfab4f58efbc70e19b70b498c81b0748.zip |
Based on some FreeBSD changes:
For *s*printf, set f._file to -1 like the comments in stdio.h say.
Use '\0', not 0, where appropriate.
Don't error out on size of '0' for v?snprintf().
Diffstat (limited to 'lib/libc/stdio/asprintf.c')
-rw-r--r-- | lib/libc/stdio/asprintf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/stdio/asprintf.c b/lib/libc/stdio/asprintf.c index 1e5f00fa1ab..a2b22a48f80 100644 --- a/lib/libc/stdio/asprintf.c +++ b/lib/libc/stdio/asprintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asprintf.c,v 1.1 1997/11/29 19:54:48 millert Exp $ */ +/* $OpenBSD: asprintf.c,v 1.2 1998/01/12 06:14:30 millert Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -31,7 +31,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: asprintf.c,v 1.1 1997/11/29 19:54:48 millert Exp $"; +static char rcsid[] = "$OpenBSD: asprintf.c,v 1.2 1998/01/12 06:14:30 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> @@ -62,6 +62,7 @@ asprintf(str, fmt, va_alist) #else va_start(ap); #endif + f._file = -1; f._flags = __SWR | __SSTR | __SALC; f._bf._base = f._p = (unsigned char *)malloc(128); if (f._bf._base == NULL) { |