From 5abbf168a97e4963a1a5e405b98f0b41c0a43181 Mon Sep 17 00:00:00 2001 From: o9000 Date: Thu, 25 Jun 2015 15:56:36 +0200 Subject: [PATCH] Cosmetic changes --- src/tint.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/tint.c b/src/tint.c index 71c6a5a..9013991 100644 --- a/src/tint.c +++ b/src/tint.c @@ -165,9 +165,7 @@ static void sigchld_handler_async() { while ((pid = waitpid(-1, NULL, WNOHANG)) > 0) { SnLauncherContext *ctx; ctx = (SnLauncherContext *) g_tree_lookup (server.pids, GINT_TO_POINTER (pid)); - if (ctx == NULL) { - fprintf(stderr, "Unknown child %d terminated!\n", pid); - } else { + if (ctx) { g_tree_remove (server.pids, GINT_TO_POINTER (pid)); sn_launcher_context_complete (ctx); sn_launcher_context_unref (ctx); @@ -1176,7 +1174,7 @@ start: // Wait for X Event or a Timer if (systray_profile) - fprintf(stderr, "[%f] %s:%d waiting for events...\n", profiling_get_time(), __FUNCTION__, __LINE__); + fprintf(stderr, "[%f] %s:%d waiting for events, timeout = %f...\n", profiling_get_time(), __FUNCTION__, __LINE__, timeout ? (timeout->tv_sec + timeout->tv_usec * 1.0e-6) : 0); if (XPending(server.dsp) > 0 || select(maxfd+1, &fdset, 0, 0, timeout) >= 0) { if (systray_profile) fprintf(stderr, "[%f] %s:%d processing events\n", profiling_get_time(), __FUNCTION__, __LINE__); @@ -1186,7 +1184,7 @@ start: sigchld_handler_async(); } } - while (XPending(server.dsp)) { + while (XPending(server.dsp) > 0) { XNextEvent(server.dsp, &e); #if HAVE_SN if (startup_notifications)