basic: drop a redundant if statement

This commit is contained in:
Frantisek Sumsal 2020-09-14 16:16:18 +02:00
parent 973bc32ab6
commit 60d7a2029a
1 changed files with 1 additions and 3 deletions

View 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);
}