aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2012-05-12 13:07:31 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2012-05-12 13:07:31 -0700
commit737de596bd1fa882e7bfeda5ef007bfaecd34cb1 (patch)
tree6d1d2f213bd6f6288b4fc04b945e66204bb9436c
parentd0090d423bdd0476451aef8ae5c1b21adc714aec (diff)
downloadklibc-737de596bd1fa882e7bfeda5ef007bfaecd34cb1.tar.gz
[klibc] f[d]open: don't bother setting input buffer
The current code relies on ->data to be set and valid only if ->ibytes contains a nonzero value, so don't bother setting the ->data pointer in other cases. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--usr/klibc/stdio/fxopen.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/usr/klibc/stdio/fxopen.c b/usr/klibc/stdio/fxopen.c
index cc11f346cec86..1dcd377a37c53 100644
--- a/usr/klibc/stdio/fxopen.c
+++ b/usr/klibc/stdio/fxopen.c
@@ -30,7 +30,6 @@ FILE *__fxopen(int fd, int flags, bool close_on_err)
f->pub._io_fileno = fd;
f->pub._io_filepos = lseek(fd, 0, SEEK_CUR);
f->bufsiz = BUFSIZ;
- f->data = f->buf + _IO_UNGET_SLOP;
f->bufmode = isatty(fd) ? _IOLBF : _IOFBF;
/* Insert into linked list */