diff options
author | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-09-03 02:44:00 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-09-03 02:44:00 +0800 |
commit | f8374109ac06f8c0528dcf27f214f26c5d2aaf8d (patch) | |
tree | 6f433c6f52d6f71cc54e4852c0866c8982e1ecb8 /calendar/gui/alarm-notify | |
parent | 8c122d342656c0cad8babf4cb26796256b636fb4 (diff) | |
download | gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.gz gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.zst gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.zip |
** Fix for bug #471791 (Move away from asserts to g_ret*)
svn path=/trunk/; revision=34156
Diffstat (limited to 'calendar/gui/alarm-notify')
-rw-r--r-- | calendar/gui/alarm-notify/alarm-queue.c | 17 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/notify-main.c | 4 |
2 files changed, 10 insertions, 11 deletions
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index ef2136a24d..28550d55f7 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -431,8 +431,7 @@ alarm_trigger_cb (gpointer alarm_id, time_t trigger, gpointer data) break; default: - g_assert_not_reached (); - break; + g_return_if_reached (); } d(printf("%s:%d (alarm_trigger_cb) - Notification sent:%d\n",__FILE__, __LINE__, action)); } @@ -648,7 +647,7 @@ remove_comp (ClientAlarms *ca, ECalComponentId *id) /* If a component is present, then it means we must have alarms queued * for it. */ - g_assert (cqa->queued_alarms != NULL); + g_return_if_fail (cqa->queued_alarms != NULL); d(printf("%s:%d (remove_comp) - Removing CQA %p\n",__FILE__, __LINE__, cqa)); remove_alarms (cqa, TRUE); @@ -1284,7 +1283,7 @@ notify_dialog_cb (AlarmNotifyResult result, int snooze_mins, gpointer data) break; default: - g_assert_not_reached (); + g_return_if_reached (); } return; @@ -1657,7 +1656,7 @@ audio_notification (time_t trigger, CompQueuedAlarms *cqa, return; alarm = e_cal_component_get_alarm (comp, qa->instance->auid); - g_assert (alarm != NULL); + g_return_if_fail (alarm != NULL); e_cal_component_alarm_get_attach (alarm, &attach); e_cal_component_alarm_free (alarm); @@ -1778,7 +1777,7 @@ procedure_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id return; alarm = e_cal_component_get_alarm (comp, qa->instance->auid); - g_assert (alarm != NULL); + g_return_if_fail (alarm != NULL); e_cal_component_alarm_get_attach (alarm, &attach); e_cal_component_alarm_get_description (alarm, &description); @@ -1794,7 +1793,7 @@ procedure_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id } url = icalattach_get_url (attach); - g_assert (url != NULL); + g_return_if_fail (url != NULL); /* Ask for confirmation before executing the stuff */ if (description.value) @@ -2062,7 +2061,7 @@ remove_cqa (ClientAlarms *ca, ECalComponentId *id, CompQueuedAlarms *cqa) /* If a component is present, then it means we must have alarms queued * for it. */ - g_assert (cqa->queued_alarms != NULL); + g_return_if_fail (cqa->queued_alarms != NULL); d(printf("%s:%d (remove_cqa) - removing %d alarms\n",__FILE__, __LINE__, g_slist_length(cqa->queued_alarms))); remove_alarms (cqa, TRUE); @@ -2093,7 +2092,7 @@ remove_client_alarms (ClientAlarms *ca) g_hash_table_foreach_remove (ca->uid_alarms_hash, (GHRFunc)remove_comp_by_id, ca); /* The hash table should be empty now */ - g_assert (g_hash_table_size (ca->uid_alarms_hash) == 0); + g_return_if_fail (g_hash_table_size (ca->uid_alarms_hash) == 0); } /** diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c index 367370aa0c..3a87002c65 100644 --- a/calendar/gui/alarm-notify/notify-main.c +++ b/calendar/gui/alarm-notify/notify-main.c @@ -111,7 +111,7 @@ init_session (void) static BonoboObject * alarm_notify_factory_fn (BonoboGenericFactory *factory, const char *component_id, void *data) { - g_assert (alarm_notify_service != NULL); + g_return_val_if_fail (alarm_notify_service != NULL, NULL); bonobo_object_ref (BONOBO_OBJECT (alarm_notify_service)); return BONOBO_OBJECT (alarm_notify_service); @@ -122,7 +122,7 @@ static gboolean init_alarm_service (gpointer user_data) { alarm_notify_service = alarm_notify_new (); - g_assert (alarm_notify_service != NULL); + g_return_val_if_fail (alarm_notify_service != NULL, FALSE); return FALSE; } |