]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: polling: gcc doesn't always optimize constants away
authorWilly Tarreau <w@1wt.eu>
Thu, 13 Dec 2012 21:26:37 +0000 (22:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 13 Dec 2012 21:30:17 +0000 (22:30 +0100)
commit462c7206bce85eee93a9f94dd31897fbfaa1c3fc
tree5470045386907d36e9eeba201aad83a96d70cdc2
parent04281bd1adb70a221bf3c14db94d4d9add0e2d61
CLEANUP: polling: gcc doesn't always optimize constants away

In ev_poll and ev_epoll, we have a bit-to-bit mapping between the POLL_
constants and the FD_POLL_ constants. A comment said that gcc was able
to detect this and to automatically apply a mask. Things have possibly
changed since the output assembly doesn't always reflect this. So let's
perform an explicit assignment when bits are equal.
src/ev_epoll.c
src/ev_poll.c