diff options
author | 2002-02-19 19:39:35 +0000 | |
---|---|---|
committer | 2002-02-19 19:39:35 +0000 | |
commit | e7beb4a7d58a6a0955c07ef9465f5caa3383f928 (patch) | |
tree | a90c75bb4a04ab98987b06850cbdffd6c1903e17 /lib/libc/stdio/asprintf.c | |
parent | Every command should have a manual page. (diff) | |
download | wireguard-openbsd-e7beb4a7d58a6a0955c07ef9465f5caa3383f928.tar.xz wireguard-openbsd-e7beb4a7d58a6a0955c07ef9465f5caa3383f928.zip |
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
Diffstat (limited to 'lib/libc/stdio/asprintf.c')
-rw-r--r-- | lib/libc/stdio/asprintf.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/libc/stdio/asprintf.c b/lib/libc/stdio/asprintf.c index f08e6c96f42..5aad5df40f2 100644 --- a/lib/libc/stdio/asprintf.c +++ b/lib/libc/stdio/asprintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asprintf.c,v 1.7 2001/09/05 22:32:33 deraadt Exp $ */ +/* $OpenBSD: asprintf.c,v 1.8 2002/02/19 19:39:36 millert Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -28,38 +28,23 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: asprintf.c,v 1.7 2001/09/05 22:32:33 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: asprintf.c,v 1.8 2002/02/19 19:39:36 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> #include <stdlib.h> #include <errno.h> -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif int -#if __STDC__ asprintf(char **str, char const *fmt, ...) -#else -asprintf(str, fmt, va_alist) - char **str; - const char *fmt; - va_dcl -#endif { int ret; va_list ap; FILE f; unsigned char *_base; -#if __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif f._file = -1; f._flags = __SWR | __SSTR | __SALC; f._bf._base = f._p = (unsigned char *)malloc(128); |