diff options
author | jmz <jmz@FreeBSD.org> | 1996-07-02 01:49:47 +0000 |
---|---|---|
committer | jmz <jmz@FreeBSD.org> | 1996-07-02 01:49:47 +0000 |
commit | 64422261a09e4e1bbd10d909af4cfea261c20a97 (patch) | |
tree | d6f8fa8a16308d5e6ff86c8e4949b3e6cc925867 | |
parent | 66550c3ffbed3be05696c356e4dbd3ab8b13255d (diff) | |
download | FreeBSD-src-64422261a09e4e1bbd10d909af4cfea261c20a97.zip FreeBSD-src-64422261a09e4e1bbd10d909af4cfea261c20a97.tar.gz |
Use read(fileno(fp), ...) instead of fread(..., fp) to avoid buffered input.
-rw-r--r-- | usr.bin/fetch/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/fetch/main.c b/usr.bin/fetch/main.c index 3ab49a8..5ed7a6c 100644 --- a/usr.bin/fetch/main.c +++ b/usr.bin/fetch/main.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. */ -/* $Id: main.c,v 1.5 1996/06/24 01:03:05 jmz Exp $ */ +/* $Id: main.c,v 1.6 1996/06/25 21:33:18 ache Exp $ */ #include <stdlib.h> #include <stdio.h> @@ -281,7 +281,7 @@ ftpget () display (size, size0); while (1) { - n = status = fread (buffer, 1, BUFFER_SIZE, fp); + n = status = read (fileno (fp), buffer, BUFFER_SIZE); if (status <= 0) break; display (size, n); |