From b88e096e197c22c544f7ea239aed3ec2f8f13a83 Mon Sep 17 00:00:00 2001 From: David Galeano Date: Thu, 10 Jan 2013 09:54:10 +0800 Subject: [PATCH] Fixed operator precedence bug. --- lib/libwebsockets.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c index 6fa27aa3..48463882 100644 --- a/lib/libwebsockets.c +++ b/lib/libwebsockets.c @@ -1527,7 +1527,7 @@ libwebsocket_service_fd(struct libwebsocket_context *context, /* pollin means a client has connected to us then */ - if (!pollfd->revents & POLLIN) + if (!(pollfd->revents & POLLIN)) break; if (context->fds_count >= MAX_CLIENTS) { @@ -1644,7 +1644,7 @@ libwebsocket_service_fd(struct libwebsocket_context *context, /* as we are listening, POLLIN means accept() is needed */ - if (!pollfd->revents & POLLIN) + if (!(pollfd->revents & POLLIN)) break; /* listen socket got an unencrypted connection... */