a 'return' statement should be here, or all stdout-writing causes EBADF.

This commit is contained in:
dora38 2017-10-21 23:03:55 +09:00
parent 5fa48d0298
commit 3efe36d9f3

View file

@ -103,7 +103,7 @@ __attribute__((weak)) long _write_r(struct _reent *r, int fd, const char *ptr, i
return lwip_write(fd, ptr, len);
}
if (fd == r->_stdout->_file) {
current_stdout_write_r(r, fd, ptr, len);
return current_stdout_write_r(r, fd, ptr, len);
}
r->_errno = EBADF;
return -1;