mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-28 10:07:13 +02:00
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:
@@ -263,6 +263,7 @@ g_poll (GPollFD *fds,
|
|||||||
g_print ("g_poll: waiting for");
|
g_print ("g_poll: waiting for");
|
||||||
|
|
||||||
for (f = fds; f < &fds[nfds]; ++f)
|
for (f = fds; f < &fds[nfds]; ++f)
|
||||||
|
{
|
||||||
if (f->fd == G_WIN32_MSG_HANDLE && (f->events & G_IO_IN))
|
if (f->fd == G_WIN32_MSG_HANDLE && (f->events & G_IO_IN))
|
||||||
{
|
{
|
||||||
if (_g_main_poll_debug && !poll_msgs)
|
if (_g_main_poll_debug && !poll_msgs)
|
||||||
@@ -283,13 +284,12 @@ g_poll (GPollFD *fds,
|
|||||||
handles[nhandles++] = (HANDLE) f->fd;
|
handles[nhandles++] = (HANDLE) f->fd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
f->revents = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (_g_main_poll_debug)
|
if (_g_main_poll_debug)
|
||||||
g_print ("\n");
|
g_print ("\n");
|
||||||
|
|
||||||
for (f = fds; f < &fds[nfds]; ++f)
|
|
||||||
f->revents = 0;
|
|
||||||
|
|
||||||
if (timeout == -1)
|
if (timeout == -1)
|
||||||
timeout = INFINITE;
|
timeout = INFINITE;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user