From: Frantisek Sumsal Date: Mon, 14 Sep 2020 14:16:18 +0000 (+0200) Subject: basic: drop a redundant if statement X-Git-Tag: v247-rc1~237^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=60d7a2029a252af810371070c5f402a10bf2d76a;p=thirdparty%2Fsystemd.git basic: drop a redundant if statement --- diff --git a/src/basic/io-util.c b/src/basic/io-util.c index 18baadb1fed..460649dedaf 100644 --- a/src/basic/io-util.c +++ b/src/basic/io-util.c @@ -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); }