diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1998-01-01 20:15:58 +0000 | 
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1998-01-01 20:15:58 +0000 | 
| commit | 8c6d2f42e1780917ba89400da7b7c084e56d7c49 (patch) | |
| tree | a1cc9a6883d176b25bb26bdb75c5ba08b25e5a72 /lib/libc/stdio/vsnprintf.c | |
| parent | 069db8db4751c2245fa1ea0cd5ed289d86820abf (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio/vsnprintf.c')
| -rw-r--r-- | lib/libc/stdio/vsnprintf.c | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/lib/libc/stdio/vsnprintf.c b/lib/libc/stdio/vsnprintf.c index 0f43d8159230..6cf2d76b7150 100644 --- a/lib/libc/stdio/vsnprintf.c +++ b/lib/libc/stdio/vsnprintf.c @@ -39,11 +39,11 @@  static char sccsid[] = "@(#)vsnprintf.c	8.1 (Berkeley) 6/4/93";  #endif  static const char rcsid[] = -		"$Id: vsnprintf.c,v 1.9 1997/12/24 23:02:47 ache Exp $"; +		"$Id: vsnprintf.c,v 1.10 1997/12/24 23:54:19 ache Exp $";  #endif /* LIBC_SCCS and not lint */ -#include <stdio.h>  #include <limits.h> +#include <stdio.h>  int  vsnprintf(str, n, fmt, ap) @@ -52,15 +52,15 @@ vsnprintf(str, n, fmt, ap)  	const char *fmt;  	_BSD_VA_LIST_ ap;  { +	size_t on;  	int ret;  	FILE f; -	size_t on;  	on = n; -	if (n > 0) +	if (n != 0)  		n--;  	if (n > INT_MAX) -		return (EOF); +		n = INT_MAX;  	f._file = -1;  	f._flags = __SWR | __SSTR;  	f._bf._base = f._p = (unsigned char *)str; | 
