From 60d7a2029a252af810371070c5f402a10bf2d76a Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Mon, 14 Sep 2020 16:16:18 +0200 Subject: [PATCH] basic: drop a redundant if statement --- src/basic/io-util.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/basic/io-util.c b/src/basic/io-util.c index 18baadb1fe..460649deda 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); }