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;
|
||||
|
||||
|
||||
+3
-5
@@ -199,12 +199,10 @@ static Virtualization detect_vm_dmi_vendor(void) {
|
||||
_cleanup_free_ char *s = NULL;
|
||||
|
||||
r = read_one_line_file(*vendor, &s);
|
||||
if (r < 0) {
|
||||
if (r == -ENOENT)
|
||||
continue;
|
||||
|
||||
if (r == -ENOENT)
|
||||
continue;
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
FOREACH_ELEMENT(dmi_vendor, dmi_vendor_table)
|
||||
if (startswith(s, dmi_vendor->vendor)) {
|
||||
|
||||
Reference in New Issue
Block a user