binfmt/, drivers/, graphics/: Fix several inappropriate accesses to get_errno() that were missed in previous changes (some going back to nuttx-.23).

This commit is contained in:
Gregory Nutt
2018-01-30 17:23:10 -06:00
parent 82982f7972
commit 30f2927101
11 changed files with 44 additions and 118 deletions
+4 -4
View File
@@ -79,7 +79,7 @@ static int syslogstream_flush(FAR struct lib_syslogstream_s *stream)
(size_t)iob->io_len);
if (nbytes < 0)
{
ret = -get_errno();
ret = (int)nbytes;
}
else
{
@@ -172,18 +172,18 @@ static void syslogstream_putc(FAR struct lib_outstream_s *this, int ch)
*/
ret = syslog_putc(ch);
if (ret != EOF)
if (ret >= 0)
{
this->nput++;
return;
}
/* The special errno value -EINTR means that syslog_putc() was
/* The special return value -EINTR means that syslog_putc() was
* awakened by a signal. This is not a real error and must be
* ignored in this context.
*/
}
while (get_errno() == -EINTR);
while (ret == -EINTR);
}
}
}