summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libc/stdio/fread.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/libc/stdio/fread.c b/lib/libc/stdio/fread.c
index 33c558708d2..2abd2ac8dea 100644
--- a/lib/libc/stdio/fread.c
+++ b/lib/libc/stdio/fread.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fread.c,v 1.15 2016/09/21 04:38:56 guenther Exp $ */
+/* $OpenBSD: fread.c,v 1.16 2018/12/14 20:48:18 millert Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -68,21 +68,6 @@ fread(void *buf, size_t size, size_t count, FILE *fp)
fp->_r = 0;
total = resid;
p = buf;
-
- if ((fp->_flags & __SNBF) != 0) {
- /*
- * We know if we're unbuffered that our buffer is empty, so
- * we can just read directly. This is much faster than the
- * loop below which will perform a series of one byte reads.
- */
- while (resid > 0 && (r = (*fp->_read)(fp->_cookie, p, resid)) > 0) {
- p += r;
- resid -= r;
- }
- FUNLOCKFILE(fp);
- return ((total - resid) / size);
- }
-
while (resid > (r = fp->_r)) {
(void)memcpy(p, fp->_p, r);
fp->_p += r;