threaded_socket_connection: Fix operator precedence error found by clang
authorBrendan Shanks <bshanks@audiovox.com>
Fri, 21 Mar 2014 02:31:58 +0000 (19:31 -0700)
committerJustin Dickow <jjdickow@gmail.com>
Fri, 21 Mar 2014 02:39:18 +0000 (22:39 -0400)
Fix an operator precedence logic error.

/Users/bshanks/dev/sdl3/SDL_Core/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc:272:32: warning: & has lower precedence than !=; != will be evaluated first [-Wparentheses]

SDL_Core/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc

index a107c1b..83aaa3a 100644 (file)
@@ -269,7 +269,7 @@ void ThreadedSocketConnection::Transmit() {
   }
 
   // receive data
-  if (0 != poll_fds[0].revents & (POLLIN | POLLPRI)) {
+  if (0 != (poll_fds[0].revents & (POLLIN | POLLPRI))) {
     const bool receive_ok = Receive();
     if (!receive_ok) {
       LOG4CXX_INFO(logger_, "Receive() failed  (#" << pthread_self() << ")");