]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic: drop a redundant if statement
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 14 Sep 2020 14:16:18 +0000 (16:16 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 14 Sep 2020 14:16:18 +0000 (16:16 +0200)
src/basic/io-util.c

index 18baadb1fed767ddb014c3d8d108a1436bf000e9..460649dedaf561c7c66538c720b14ea1c4cdc307 100644 (file)
@@ -153,10 +153,8 @@ int pipe_eof(int fd) {
         int r;
 
         r = fd_wait_for_event(fd, POLLIN, 0);
-        if (r < 0)
+        if (r <= 0)
                 return r;
-        if (r == 0)
-                return 0;
 
         return !!(r & POLLHUP);
 }