glib r7534 - in branches/glib-2-18: . glib
- From: tml svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7534 - in branches/glib-2-18: . glib
- Date: Tue, 23 Sep 2008 15:37:36 +0000 (UTC)
Author: tml
Date: Tue Sep 23 15:37:36 2008
New Revision: 7534
URL: http://svn.gnome.org/viewvc/glib?rev=7534&view=rev
Log:
2008-09-23 Tor Lillqvist <tml novell com>
* glib/gmain.c (poll_rest) [Win32]: Fix embarrassing bug: I was
passing an incorrect third parameter to memmove(), had forgotten
to multiply by the size of the table entry. Just use a for loop
instead, clearer. Odd I didn't notice when testing this code.
Modified:
branches/glib-2-18/ChangeLog
branches/glib-2-18/glib/gmain.c
Modified: branches/glib-2-18/glib/gmain.c
==============================================================================
--- branches/glib-2-18/glib/gmain.c (original)
+++ branches/glib-2-18/glib/gmain.c Tue Sep 23 15:37:36 2008
@@ -447,8 +447,10 @@
if (timeout == 0 && nhandles > 1)
{
/* Remove the handle that fired */
+ int i;
if (ready < nhandles - 1)
- memmove (handles + ready - WAIT_OBJECT_0, handles + ready - WAIT_OBJECT_0 + 1, nhandles - ready - 1);
+ for (i = ready - WAIT_OBJECT_0 + 1; i < nhandles; i++)
+ handles[i-1] = handles[i];
nhandles--;
recursed_result = poll_rest (FALSE, handles, nhandles, fds, nfds, 0);
return (recursed_result == -1) ? -1 : 1 + recursed_result;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]