From: lurchi Date: Sat, 12 Aug 2017 15:39:54 +0000 (+0200) Subject: fix off-by-one error that prevented reading from stdin X-Git-Tag: gnunet-0.11.0rc0~48^2^2~19 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=70fedfb249696028103dd77f5641f8f7b46f5c61;p=oweals%2Fgnunet.git fix off-by-one error that prevented reading from stdin --- diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 1f5fe3f61..2ea2378eb 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c @@ -1929,7 +1929,7 @@ select_add (void *cls, GNUNET_assert (NULL != task); GNUNET_assert (NULL != fdi); - if (!((NULL != fdi->fd) ^ (NULL != fdi->fh)) || (0 >= fdi->sock)) + if (!((NULL != fdi->fd) ^ (NULL != fdi->fh)) || (0 > fdi->sock)) { /* exactly one out of {fd, hf} must be != NULL and the OS handle must be valid */ return GNUNET_SYSERR;