mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 00:47:28 +01:00
convert-to-nia: fix use of errno after read
This commit is contained in:
1 parent
53120477f8
commit
b76af12139
1 file changed
+1
-4
@@ -348,10 +348,7 @@ read_more_src() {
|
||||
g_src.data.len - g_src.meta.wi);
|
||||
if (n > 0) {
|
||||
g_src.meta.wi += n;
|
||||
} else if (errno == 0) {
|
||||
if (n < 0) {
|
||||
return "main: unexpected negative-count read";
|
||||
}
|
||||
} else if (n == 0) {
|
||||
g_src.meta.closed = true;
|
||||
} else if (errno != EINTR) {
|
||||
return strerror(errno);
|
||||
|
||||
Reference in new issue
Block a user