a 'return' statement should be here, or all stdin-reading causes EBADF.

This commit is contained in:
dora38 2017-10-22 01:40:30 +09:00
parent 3efe36d9f3
commit 63ed22f2ee

View file

@ -138,7 +138,7 @@ __attribute__((weak)) long _read_r( struct _reent *r, int fd, char *ptr, int len
return lwip_read(fd, ptr, len);
}
if (fd == r->_stdin->_file) {
_read_stdin_r(r, fd, ptr, len);
return _read_stdin_r(r, fd, ptr, len);
}
r->_errno = EBADF;
return -1;