tree-wide: flatten nested error checks
This commit is contained in:
committed by
Yu Watanabe
parent
13a74f350e
commit
94446e4f5a
+6
-10
@@ -1263,12 +1263,10 @@ int flush_accept(int fd) {
|
||||
int cfd;
|
||||
|
||||
r = fd_wait_for_event(fd, POLLIN, 0);
|
||||
if (r < 0) {
|
||||
if (r == -EINTR)
|
||||
continue;
|
||||
|
||||
if (r == -EINTR)
|
||||
continue;
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
if (r == 0)
|
||||
return 0;
|
||||
|
||||
@@ -1305,12 +1303,10 @@ ssize_t flush_mqueue(int fd) {
|
||||
ssize_t l;
|
||||
|
||||
r = fd_wait_for_event(fd, POLLIN, /* timeout= */ 0);
|
||||
if (r < 0) {
|
||||
if (r == -EINTR)
|
||||
continue;
|
||||
|
||||
if (r == -EINTR)
|
||||
continue;
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
if (r == 0)
|
||||
return count;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user