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:
Lennart Poettering
2015-09-09 08:20:20 +02:00
parent 7f6e12b033
commit 3cc2aff1ab
8 changed files with 53 additions and 19 deletions
+2 -5
View File
@@ -399,13 +399,10 @@ int main(int argc, char *argv[]) {
struct epoll_event event;
int k;
if ((k = epoll_wait(server.epoll_fd,
&event, 1,
TIMEOUT_MSEC)) < 0) {
k = epoll_wait(server.epoll_fd, &event, 1, TIMEOUT_MSEC);
if (k < 0) {
if (errno == EINTR)
continue;
log_error_errno(errno, "epoll_wait() failed: %m");
goto fail;
}