diff options
author | 2005-05-28 04:34:05 +0000 | |
---|---|---|
committer | 2005-05-28 04:34:05 +0000 | |
commit | fd14b462090ec42522658235a4979b806664be52 (patch) | |
tree | be79bbefeee95fa22b5fe01d7a16a31c2b938503 /lib/libc/stdio/vsnprintf.c | |
parent | Handle XS_SHORTSENSE error codes in ioctl situations. From NetBSD. (diff) | |
download | wireguard-openbsd-fd14b462090ec42522658235a4979b806664be52.tar.xz wireguard-openbsd-fd14b462090ec42522658235a4979b806664be52.zip |
Use '\0' not 0 when storing as a char, part from Andrey Matveev.
Diffstat (limited to 'lib/libc/stdio/vsnprintf.c')
-rw-r--r-- | lib/libc/stdio/vsnprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdio/vsnprintf.c b/lib/libc/stdio/vsnprintf.c index 11d17f6a430..4efa3e636b4 100644 --- a/lib/libc/stdio/vsnprintf.c +++ b/lib/libc/stdio/vsnprintf.c @@ -31,7 +31,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: vsnprintf.c,v 1.8 2005/04/30 09:25:17 espie Exp $"; +static char rcsid[] = "$OpenBSD: vsnprintf.c,v 1.9 2005/05/28 04:34:05 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <limits.h> @@ -61,6 +61,6 @@ vsnprintf(char *str, size_t n, const char *fmt, _BSD_VA_LIST_ ap) f._bf._base = f._p = (unsigned char *)str; f._bf._size = f._w = n - 1; ret = vfprintf(&f, fmt, ap); - *f._p = 0; + *f._p = '\0'; return (ret); } |