tree-wide: don't do assignments within if checks
Turn this:
if ((r = foo()) < 0) { ...
into this:
r = foo();
if (r < 0) { ...
This commit is contained in:
+4
-2
@@ -201,9 +201,11 @@ int fdset_cloexec(FDSet *fds, bool b) {
|
||||
|
||||
assert(fds);
|
||||
|
||||
SET_FOREACH(p, MAKE_SET(fds), i)
|
||||
if ((r = fd_cloexec(PTR_TO_FD(p), b)) < 0)
|
||||
SET_FOREACH(p, MAKE_SET(fds), i) {
|
||||
r = fd_cloexec(PTR_TO_FD(p), b);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user