diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-04-30 20:45:34 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-04-30 20:45:34 +0000 |
commit | 44bb3977a6ba81cd5536b8e22ebfc767b80313f7 (patch) | |
tree | a8e2c45ede6bfc824351051937dba7d7fac318dc /common | |
parent | 7d573c7ae14bbbb2d924837413879c71f8c385f4 (diff) |
Some small cleanups
Diffstat (limited to 'common')
-rw-r--r-- | common/glib-ectomy.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/common/glib-ectomy.c b/common/glib-ectomy.c index 45f9ce0d..d78b6172 100644 --- a/common/glib-ectomy.c +++ b/common/glib-ectomy.c @@ -94,6 +94,7 @@ struct watch { }; static struct watch watch_head = { .id = 0, .prev = 0, .next = 0, .revents = 0 }; + static GMainContext *default_context = NULL; static void watch_remove(struct watch *w) @@ -201,6 +202,7 @@ GMainLoop *g_main_loop_new(GMainContext *context, gboolean is_running) ml->context = context; ml->bail = 0; + return ml; } @@ -243,8 +245,8 @@ static void timeout_handlers_check(GMainContext *context) l = l->next; if ((tv.tv_sec < t->expiration.tv_sec) || - (tv.tv_sec == t->expiration.tv_sec && - tv.tv_usec < t->expiration.tv_usec)) + (tv.tv_sec == t->expiration.tv_sec && + tv.tv_usec < t->expiration.tv_usec)) continue; if (t->func(t->data)) { @@ -407,6 +409,3 @@ gint g_timeout_remove(const guint id) return -1; } - - - |