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 @@ -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 != '%')