diff options
| author | David E. O'Brien <obrien@FreeBSD.org> | 1998-09-25 12:20:27 +0000 |
|---|---|---|
| committer | David E. O'Brien <obrien@FreeBSD.org> | 1998-09-25 12:20:27 +0000 |
| commit | 5846581c2e0d61f02e2ae2763435bf46edd9d73e (patch) | |
| tree | 562b5d6684801aee088617e1bffafd085b46ee83 /lib/libc | |
| parent | a3cd0185628d4b60ea1b2521f69d2a88a9608f68 (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/stdio/vfscanf.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c index ba4be5cd82c2..95e870171a4b 100644 --- a/lib/libc/stdio/vfscanf.c +++ b/lib/libc/stdio/vfscanf.c @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)vfscanf.c 8.1 (Berkeley) 6/4/93"; #endif static const char rcsid[] = - "$Id: vfscanf.c,v 1.11 1997/07/01 17:46:39 jkh Exp $"; + "$Id: vfscanf.c,v 1.12 1997/11/23 06:02:47 bde Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> @@ -137,13 +137,8 @@ __svfscanf(fp, fmt0, ap) if (c == 0) return (nassigned); if (isspace(c)) { - for (;;) { - if (fp->_r <= 0 && __srefill(fp)) - goto input_failure; - if (!isspace(*fp->_p)) - break; + while ((fp->_r > 0 || __srefill(fp) == 0) && isspace(*fp->_p)) nread++, fp->_r--, fp->_p++; - } continue; } if (c != '%') |
