summaryrefslogtreecommitdiff
path: root/gmain.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2001-02-01 22:28:48 +0000
committerTor Lillqvist <tml@src.gnome.org>2001-02-01 22:28:48 +0000
commitc2bd295c57059ac0c14d6fbb3741b1f69dbc4ff3 (patch)
tree7fc1c2054f4d0ee82d94cdbc25871a9355855dc1 /gmain.c
parent5434105fcb432bd2549359e6e4d641d57ea6f632 (diff)
downloadglib-c2bd295c57059ac0c14d6fbb3741b1f69dbc4ff3.tar.gz
giochannel.h giowin32.c Stylistic cleanups. Use G_STRLOC in g_warning()
2001-02-02 Tor Lillqvist <tml@iki.fi> * giochannel.h * giowin32.c * gmain.c: Stylistic cleanups. Use G_STRLOC in g_warning() calls. * glib.def: Add missing functions. 2001-01-31 Tor Lillqvist <tml@iki.fi> * glibconfig.h.win32.in: Corresponding change as below to GStaticMutex.
Diffstat (limited to 'gmain.c')
-rw-r--r--gmain.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/gmain.c b/gmain.c
index 946a86262..b4db4d241 100644
--- a/gmain.c
+++ b/gmain.c
@@ -294,7 +294,7 @@ g_poll (GPollFD *fds,
g_print ("WaitMessage\n");
#endif
if (!WaitMessage ())
- g_warning ("g_poll: WaitMessage failed");
+ g_warning (G_STRLOC ": WaitMessage() failed");
ready = WAIT_OBJECT_0 + nhandles;
}
else if (timeout == 0)
@@ -310,8 +310,9 @@ g_poll (GPollFD *fds,
* -> Set a timer, wait for message,
* kill timer, use PeekMessage
*/
- if ((timer = SetTimer (NULL, 0, timeout, NULL)) == 0)
- g_warning ("g_poll: SetTimer failed");
+ timer = SetTimer (NULL, 0, timeout, NULL);
+ if (timer == 0)
+ g_warning (G_STRLOC ": SetTimer() failed");
else
{
#ifdef G_MAIN_POLL_DEBUG
@@ -342,7 +343,7 @@ g_poll (GPollFD *fds,
timeout, QS_ALLINPUT);
if (ready == WAIT_FAILED)
- g_warning ("g_poll: MsgWaitForMultipleObjects failed");
+ g_warning (G_STRLOC ": MsgWaitForMultipleObjects() failed");
}
}
}
@@ -361,7 +362,7 @@ g_poll (GPollFD *fds,
#endif
ready = WaitForMultipleObjects (nhandles, handles, FALSE, timeout);
if (ready == WAIT_FAILED)
- g_warning ("g_poll: WaitForMultipleObjects failed");
+ g_warning (G_STRLOC ": WaitForMultipleObjects() failed");
}
#ifdef G_MAIN_POLL_DEBUG
@@ -600,8 +601,10 @@ g_main_context_get (GThread *thread)
context->wake_up_rec.events = G_IO_IN;
g_main_context_add_poll_unlocked (context, 0, &context->wake_up_rec);
#else
- if ((context->wake_up_semaphore = CreateSemaphore (NULL, 0, 100, NULL)) == NULL)
- g_error ("Cannot create wake-up semaphore: %s", g_win32_error_message (GetLastError ()));
+ context->wake_up_semaphore = CreateSemaphore (NULL, 0, 100, NULL);
+ if (context->wake_up_semaphore == NULL)
+ g_error ("Cannot create wake-up semaphore: %s",
+ g_win32_error_message (GetLastError ()));
context->wake_up_rec.fd = (gint) context->wake_up_semaphore;
context->wake_up_rec.events = G_IO_IN;
#ifdef G_MAIN_POLL_DEBUG