summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/test/test_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index b3a1e2caca..c4da911f83 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -5937,7 +5937,7 @@ static int
fd_is_nonblocking(tor_socket_t fd)
{
int flags = fcntl(fd, F_GETFL, 0);
- return (flags & O_NONBLOCK) == O_NONBLOCK;
+ return (flags & O_NONBLOCK) != 0;
}
#endif /* !defined(_WIN32) */