From d36e9d65a051ac0cee7253e43b5141b14fc7cddf Mon Sep 17 00:00:00 2001 From: dora38 Date: Tue, 24 Oct 2017 06:55:11 +0900 Subject: [PATCH] Fix a printf issue. (#474) Added missing return statements to stdio --- core/newlib_syscalls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/newlib_syscalls.c b/core/newlib_syscalls.c index 610b570..a793cec 100644 --- a/core/newlib_syscalls.c +++ b/core/newlib_syscalls.c @@ -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; @@ -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;