From a4a741f7cfab4f58efbc70e19b70b498c81b0748 Mon Sep 17 00:00:00 2001 From: millert Date: Mon, 12 Jan 1998 06:14:30 +0000 Subject: 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(). --- lib/libc/stdio/asprintf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/libc/stdio/asprintf.c') 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 @@ -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 @@ -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) { -- cgit v1.2.3-59-g8ed1b