X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=glib%2Fgpoll.c;h=adc67820aa7879255c68f63fb911ce45154fdeb9;hb=20f6cc2a10ba26860e7a6d27c100deadb5497772;hp=561271561f7839ca100fe544ca69b4c12fa1b3d5;hpb=42cf80780b4fbbe9063ed3d962bb13f341757b3f;p=platform%2Fupstream%2Fglib.git diff --git a/glib/gpoll.c b/glib/gpoll.c index 5612715..adc6782 100644 --- a/glib/gpoll.c +++ b/glib/gpoll.c @@ -110,7 +110,7 @@ extern gboolean _g_main_poll_debug; * Windows, the easiest solution is to construct all of your * #GPollFDs with g_io_channel_win32_make_pollfd(). * - * Return value: the number of entries in @fds whose %revents fields + * Returns: the number of entries in @fds whose %revents fields * were filled in, or 0 if the operation timed out, or -1 on error or * if the call was interrupted. * @@ -271,30 +271,17 @@ g_poll (GPollFD *fds, } else if (f->fd > 0) { - /* Don't add the same handle several times into the array, as - * docs say that is not allowed, even if it actually does seem - * to work. - */ - gint i; - - for (i = 0; i < nhandles; i++) - if (handles[i] == (HANDLE) f->fd) - break; - - if (i == nhandles) - { - if (nhandles == MAXIMUM_WAIT_OBJECTS) - { - g_warning ("Too many handles to wait for!\n"); - break; - } - else - { - if (_g_main_poll_debug) - g_print (" %p", (HANDLE) f->fd); - handles[nhandles++] = (HANDLE) f->fd; - } - } + if (nhandles == MAXIMUM_WAIT_OBJECTS) + { + g_warning ("Too many handles to wait for!\n"); + break; + } + else + { + if (_g_main_poll_debug) + g_print (" %p", (HANDLE) f->fd); + handles[nhandles++] = (HANDLE) f->fd; + } } if (_g_main_poll_debug)