summaryrefslogtreecommitdiff
path: root/lib/pipe-filter-gi.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2009-08-23 01:37:15 +0200
committerBruno Haible <bruno@clisp.org>2009-08-23 01:37:15 +0200
commit27089d6d0d388650eb8380ee178458700ffc3bcf (patch)
treedd1775e47b8844c65d17929e94b9160b23d8703e /lib/pipe-filter-gi.c
parentc7054c798329aaa675b627e09180b0730eee49f5 (diff)
downloadgnulib-27089d6d0d388650eb8380ee178458700ffc3bcf.tar.gz
Fix test of fcntl's return value.
Diffstat (limited to 'lib/pipe-filter-gi.c')
-rw-r--r--lib/pipe-filter-gi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pipe-filter-gi.c b/lib/pipe-filter-gi.c
index 886820a414..340b38af0c 100644
--- a/lib/pipe-filter-gi.c
+++ b/lib/pipe-filter-gi.c
@@ -248,9 +248,9 @@ filter_init (struct pipe_filter_gi *filter)
int fcntl_flags;
if ((fcntl_flags = fcntl (filter->fd[1], F_GETFL, 0)) < 0
- || fcntl (filter->fd[1], F_SETFL, fcntl_flags | O_NONBLOCK) < 0
+ || fcntl (filter->fd[1], F_SETFL, fcntl_flags | O_NONBLOCK) == -1
|| (fcntl_flags = fcntl (filter->fd[0], F_GETFL, 0)) < 0
- || fcntl (filter->fd[0], F_SETFL, fcntl_flags | O_NONBLOCK) < 0)
+ || fcntl (filter->fd[0], F_SETFL, fcntl_flags | O_NONBLOCK) == -1)
{
if (filter->exit_on_error)
error (EXIT_FAILURE, errno,