glib/gpoll W32: fold f->revents = 0 into for() loop

GCC most likely optimizes that already, but no harm in trying.

https://bugzilla.gnome.org/show_bug.cgi?id=785468
This commit is contained in:
Руслан Ижбулатов 2017-07-29 08:04:10 +00:00
parent cb2316aaa1
commit 1f3da929f5

View File

@ -263,6 +263,7 @@ g_poll (GPollFD *fds,
g_print ("g_poll: waiting for");
for (f = fds; f < &fds[nfds]; ++f)
{
if (f->fd == G_WIN32_MSG_HANDLE && (f->events & G_IO_IN))
{
if (_g_main_poll_debug && !poll_msgs)
@ -283,13 +284,12 @@ g_poll (GPollFD *fds,
handles[nhandles++] = (HANDLE) f->fd;
}
}
f->revents = 0;
}
if (_g_main_poll_debug)
g_print ("\n");
for (f = fds; f < &fds[nfds]; ++f)
f->revents = 0;
if (timeout == -1)
timeout = INFINITE;