diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-02-19 19:39:42 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-02-19 19:39:42 +0000 |
commit | 3923126b85f9e8a77cab9a41b5a62125acd5b4cd (patch) | |
tree | 1a8b19c5db03f8c989fc8228811837b182feb7a3 /lib/libc/stdio/snprintf.c | |
parent | cc03bdb70090357d2393b6ec82e3cde4d5ce5edd (diff) |
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
Diffstat (limited to 'lib/libc/stdio/snprintf.c')
-rw-r--r-- | lib/libc/stdio/snprintf.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/libc/stdio/snprintf.c b/lib/libc/stdio/snprintf.c index 5bd97f0bead..d8d6ccb74d4 100644 --- a/lib/libc/stdio/snprintf.c +++ b/lib/libc/stdio/snprintf.c @@ -35,27 +35,15 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: snprintf.c,v 1.6 1998/01/12 06:20:56 millert Exp $"; +static char rcsid[] = "$OpenBSD: snprintf.c,v 1.7 2002/02/19 19:39:37 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <limits.h> #include <stdio.h> -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif int -#ifdef __STDC__ snprintf(char *str, size_t n, char const *fmt, ...) -#else -snprintf(str, n, fmt, va_alist) - char *str; - size_t n; - char *fmt; - va_dcl -#endif { int ret; va_list ap; @@ -64,11 +52,7 @@ snprintf(str, n, fmt, va_alist) /* While snprintf(3) specifies size_t stdio uses an int internally */ if (n > INT_MAX) n = INT_MAX; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif f._file = -1; f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *)str; |