4
0
Эх сурвалжийг харах

coroipc: Handle pfd.revents as bit-field

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Jan Friesse 13 жил өмнө
parent
commit
b6aabed698

+ 1 - 3
include/corosync/coroipc_ipc.h

@@ -243,9 +243,7 @@ retry_poll:
 			}
 
 			if (res == 1) {
-				if (pfd.revents == POLLERR ||
-					pfd.revents == POLLHUP ||
-					pfd.revents == POLLNVAL) {
+				if (pfd.revents & (POLLERR|POLLHUP|POLLNVAL)) {
 
 					return (CS_ERR_LIBRARY);
 				}