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
+3 -1
View File
@@ -982,7 +982,9 @@ static int fifo_address_create(
goto fail;
}
if ((fd = open(path, O_RDWR|O_CLOEXEC|O_NOCTTY|O_NONBLOCK|O_NOFOLLOW)) < 0) {
fd = open(path,
O_RDWR | O_CLOEXEC | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW);
if (fd < 0) {
r = -errno;
goto fail;
}