diff options
author | Manish Singh <yosh@gimp.org> | 2004-11-08 18:49:35 +0000 |
---|---|---|
committer | Manish Singh <yosh@src.gnome.org> | 2004-11-08 18:49:35 +0000 |
commit | f026692d2ab3434b82bb7bdde57ed8cfb943d8a7 (patch) | |
tree | 9c881dcc37b8eae7e77418ae5a2a215fe5894874 | |
parent | c83e52605f373aeae29f02361d51af3799e6dae2 (diff) | |
download | glib-f026692d2ab3434b82bb7bdde57ed8cfb943d8a7.tar.gz |
glib/gasyncqueue.c glib/ghook.c g_return_if_fail -> g_return_val_if_fail
Mon Nov 8 10:45:50 2004 Manish Singh <yosh@gimp.org>
* glib/gasyncqueue.c
* glib/ghook.c
* glib/giochannel.c: g_return_if_fail -> g_return_val_if_fail
* glib/gmain.c: Ditto, plus also make g_main_context_ref() actually
return the passed in pointer.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-12 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 9 | ||||
-rw-r--r-- | glib/gasyncqueue.c | 4 | ||||
-rw-r--r-- | glib/ghook.c | 6 | ||||
-rw-r--r-- | glib/giochannel.c | 2 | ||||
-rw-r--r-- | glib/gmain.c | 6 |
9 files changed, 55 insertions, 8 deletions
@@ -1,3 +1,12 @@ +Mon Nov 8 10:45:50 2004 Manish Singh <yosh@gimp.org> + + * glib/gasyncqueue.c + * glib/ghook.c + * glib/giochannel.c: g_return_if_fail -> g_return_val_if_fail + + * glib/gmain.c: Ditto, plus also make g_main_context_ref() actually + return the passed in pointer. + 2004-11-08 Matthias Clasen <mclasen@redhat.com> * glib/gasyncqueue.[hc]: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 4adb44286..2849bca2a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +Mon Nov 8 10:45:50 2004 Manish Singh <yosh@gimp.org> + + * glib/gasyncqueue.c + * glib/ghook.c + * glib/giochannel.c: g_return_if_fail -> g_return_val_if_fail + + * glib/gmain.c: Ditto, plus also make g_main_context_ref() actually + return the passed in pointer. + 2004-11-08 Matthias Clasen <mclasen@redhat.com> * glib/gasyncqueue.[hc]: diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 4adb44286..2849bca2a 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,12 @@ +Mon Nov 8 10:45:50 2004 Manish Singh <yosh@gimp.org> + + * glib/gasyncqueue.c + * glib/ghook.c + * glib/giochannel.c: g_return_if_fail -> g_return_val_if_fail + + * glib/gmain.c: Ditto, plus also make g_main_context_ref() actually + return the passed in pointer. + 2004-11-08 Matthias Clasen <mclasen@redhat.com> * glib/gasyncqueue.[hc]: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 4adb44286..2849bca2a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +Mon Nov 8 10:45:50 2004 Manish Singh <yosh@gimp.org> + + * glib/gasyncqueue.c + * glib/ghook.c + * glib/giochannel.c: g_return_if_fail -> g_return_val_if_fail + + * glib/gmain.c: Ditto, plus also make g_main_context_ref() actually + return the passed in pointer. + 2004-11-08 Matthias Clasen <mclasen@redhat.com> * glib/gasyncqueue.[hc]: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 4adb44286..2849bca2a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +Mon Nov 8 10:45:50 2004 Manish Singh <yosh@gimp.org> + + * glib/gasyncqueue.c + * glib/ghook.c + * glib/giochannel.c: g_return_if_fail -> g_return_val_if_fail + + * glib/gmain.c: Ditto, plus also make g_main_context_ref() actually + return the passed in pointer. + 2004-11-08 Matthias Clasen <mclasen@redhat.com> * glib/gasyncqueue.[hc]: diff --git a/glib/gasyncqueue.c b/glib/gasyncqueue.c index 6822f7dee..6efe379fd 100644 --- a/glib/gasyncqueue.c +++ b/glib/gasyncqueue.c @@ -70,8 +70,8 @@ g_async_queue_new (void) GAsyncQueue * g_async_queue_ref (GAsyncQueue *queue) { - g_return_if_fail (queue); - g_return_if_fail (g_atomic_int_get (&queue->ref_count) > 0); + g_return_val_if_fail (queue, NULL); + g_return_val_if_fail (g_atomic_int_get (&queue->ref_count) > 0, NULL); g_atomic_int_inc (&queue->ref_count); diff --git a/glib/ghook.c b/glib/ghook.c index 83ef80979..b01b83074 100644 --- a/glib/ghook.c +++ b/glib/ghook.c @@ -226,9 +226,9 @@ GHook * g_hook_ref (GHookList *hook_list, GHook *hook) { - g_return_if_fail (hook_list != NULL); - g_return_if_fail (hook != NULL); - g_return_if_fail (hook->ref_count > 0); + g_return_val_if_fail (hook_list != NULL, NULL); + g_return_val_if_fail (hook != NULL, NULL); + g_return_val_if_fail (hook->ref_count > 0, NULL); hook->ref_count++; diff --git a/glib/giochannel.c b/glib/giochannel.c index c911a2687..bb0e9d6a4 100644 --- a/glib/giochannel.c +++ b/glib/giochannel.c @@ -94,7 +94,7 @@ g_io_channel_init (GIOChannel *channel) GIOChannel * g_io_channel_ref (GIOChannel *channel) { - g_return_if_fail (channel != NULL); + g_return_val_if_fail (channel != NULL, NULL); channel->ref_count++; diff --git a/glib/gmain.c b/glib/gmain.c index 7ee0b1a05..a9382aebe 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -595,10 +595,12 @@ g_poll (GPollFD *fds, GMainContext * g_main_context_ref (GMainContext *context) { - g_return_if_fail (context != NULL); - g_return_if_fail (g_atomic_int_get (&context->ref_count) > 0); + g_return_val_if_fail (context != NULL, NULL); + g_return_val_if_fail (g_atomic_int_get (&context->ref_count) > 0, NULL); g_atomic_int_inc (&context->ref_count); + + return context; } /* If DISABLE_MEM_POOLS is defined, then freeing the |