don't forget to clear _cnt.
authorRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Tue, 5 Jun 1984 06:40:45 +0000 (22:40 -0800)
committerRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Tue, 5 Jun 1984 06:40:45 +0000 (22:40 -0800)
SCCS-vsn: lib/libc/stdio/fprintf.c 4.3

usr/src/lib/libc/stdio/fprintf.c

index 54125e2..f9c9571 100644 (file)
@@ -1,4 +1,4 @@
-/* @(#)fprintf.c       4.2 (Berkeley) %G% */
+/* @(#)fprintf.c       4.3 (Berkeley) %G% */
 #include       <stdio.h>
 
 fprintf(iop, fmt, args)
 #include       <stdio.h>
 
 fprintf(iop, fmt, args)
@@ -16,6 +16,7 @@ char *fmt;
                iop->_flag |= _IONBF;
                iop->_base = NULL;
                iop->_bufsiz = NULL;
                iop->_flag |= _IONBF;
                iop->_base = NULL;
                iop->_bufsiz = NULL;
+               iop->_cnt = 0;
        } else
                _doprnt(fmt, &args, iop);
        return(ferror(iop)? EOF: 0);
        } else
                _doprnt(fmt, &args, iop);
        return(ferror(iop)? EOF: 0);