diff options
author | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-09-03 02:51:21 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-09-03 02:51:21 +0800 |
commit | 0a362c9453f46464d6f227b410f12ff271af16e4 (patch) | |
tree | f10d8ede5a9f52f12ccfeecacbfce070af8b05f6 | |
parent | f8374109ac06f8c0528dcf27f214f26c5d2aaf8d (diff) | |
download | gsoc2013-evolution-0a362c9453f46464d6f227b410f12ff271af16e4.tar.gz gsoc2013-evolution-0a362c9453f46464d6f227b410f12ff271af16e4.tar.zst gsoc2013-evolution-0a362c9453f46464d6f227b410f12ff271af16e4.zip |
** Fix for bug #471791 (Move away from assert to g_ret)
svn path=/trunk/; revision=34157
-rw-r--r-- | addressbook/ChangeLog | 15 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-config.c | 11 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-view.c | 2 | ||||
-rw-r--r-- | addressbook/gui/contact-list-editor/e-contact-list-editor.c | 2 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 4 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-gui-util.c | 2 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-popup-control.c | 4 | ||||
-rw-r--r-- | addressbook/printing/e-contact-print.c | 2 |
8 files changed, 27 insertions, 15 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index b7d8ea6784..4c390874b0 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,18 @@ +2007-09-03 Srinivasa Ragavan <sragavan@novell.com> + + ** Fix for bug #471791 (Move away from assert to g_ret) + + * gui/component/addressbook-config.c: (ldap_unparse_auth), + (ldap_unparse_scope), (ldap_unparse_ssl), (source_to_uri_parts): + * gui/component/addressbook-view.c: (control_activate_cb): + * gui/contact-list-editor/e-contact-list-editor.c: + (e_contact_list_editor_close): + * gui/widgets/e-addressbook-view.c: (table_double_click), + (treeview_row_activated): + * gui/widgets/eab-gui-util.c: (eab_search_result_dialog): + * gui/widgets/eab-popup-control.c: (set_prop), (get_prop): + * printing/e-contact-print.c: (contact_compare): + 2007-08-27 Johnny Jacob <jjohnny@novell.com> Committed on behalf of Ushveen Kaur <kushveen@novell.com> diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index b9dd4adb20..77624a6ee5 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -145,8 +145,7 @@ ldap_unparse_auth (AddressbookLDAPAuthType auth_type) case ADDRESSBOOK_LDAP_AUTH_SIMPLE_BINDDN: return "ldap/simple-binddn"; default: - g_assert(0); - return "none"; + g_return_val_if_reached ("none"); } } @@ -175,8 +174,7 @@ ldap_unparse_scope (AddressbookLDAPScopeType scope_type) case ADDRESSBOOK_LDAP_SCOPE_SUBTREE: return "sub"; default: - g_assert(0); - return ""; + g_return_val_if_reached (""); } } @@ -191,8 +189,7 @@ ldap_unparse_ssl (AddressbookLDAPSSLType ssl_type) case ADDRESSBOOK_LDAP_SSL_ALWAYS: return "always"; default: - g_assert(0); - return ""; + g_return_val_if_reached (""); } } @@ -217,7 +214,7 @@ source_to_uri_parts (ESource *source, gchar **host, gchar **rootdn, AddressbookL LDAPURLDesc *lud; gint ldap_error; - g_assert (source); + g_return_val_if_fail (source); uri = e_source_get_uri (source); ldap_error = ldap_url_parse ((gchar *) uri, &lud); diff --git a/addressbook/gui/component/addressbook-view.c b/addressbook/gui/component/addressbook-view.c index 6a8d3f465d..dea1aa9a22 100644 --- a/addressbook/gui/component/addressbook-view.c +++ b/addressbook/gui/component/addressbook-view.c @@ -686,7 +686,7 @@ control_activate_cb (BonoboControl *control, EABView *v = get_current_view (view); uic = bonobo_control_get_ui_component (control); - g_assert (uic != NULL); + g_return_if_fail (uic != NULL); if (activate) { control_activate (control, uic, view); diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index 6f6b797aca..ebc89c4b2a 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -641,7 +641,7 @@ static void e_contact_list_editor_close (EABEditor *editor) { EContactListEditor *cle = E_CONTACT_LIST_EDITOR (editor); - g_assert (cle->app != NULL); + g_return_if_fail (cle->app != NULL); gtk_widget_destroy (cle->app); cle->app = NULL; diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 34a5e69b80..6cb1a994d2 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1094,7 +1094,7 @@ table_double_click(ETableScrolled *table, gint row, gint col, GdkEvent *event, E "book", &book, NULL); - g_assert (E_IS_BOOK (book)); + g_return_if_fail (E_IS_BOOK (book)); if (e_contact_get (contact, E_CONTACT_IS_LIST)) eab_show_contact_list_editor (book, contact, FALSE, view->editable); @@ -1365,7 +1365,7 @@ treeview_row_activated(GtkTreeView *treeview, "book", &book, NULL); - g_assert (E_IS_BOOK (book)); + g_return_if_fail (E_IS_BOOK (book)); if (e_card_evolution_list (card)) eab_show_contact_list_editor (book, card, FALSE, view->editable); diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index d4010edc00..52861a2800 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -166,7 +166,7 @@ eab_search_result_dialog (GtkWidget *parent, str = _("This query did not complete successfully."); break; default: - g_assert_not_reached (); + g_return_if_reached (); } e_error_run ((GtkWindow *) parent, "addressbook:search-error", str, NULL); diff --git a/addressbook/gui/widgets/eab-popup-control.c b/addressbook/gui/widgets/eab-popup-control.c index 5181d6e73f..81baba6752 100644 --- a/addressbook/gui/widgets/eab-popup-control.c +++ b/addressbook/gui/widgets/eab-popup-control.c @@ -380,7 +380,7 @@ set_prop (BonoboPropertyBag *bag, const BonoboArg *arg, guint arg_id, CORBA_Envi break; default: - g_assert_not_reached (); + g_return_if_reached (); } } @@ -404,7 +404,7 @@ get_prop (BonoboPropertyBag *bag, BonoboArg *arg, guint arg_id, CORBA_Environmen break; default: - g_assert_not_reached (); + g_return_if_reached (); } } diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c index a49501ba8b..b8b1aee6f2 100644 --- a/addressbook/printing/e-contact-print.c +++ b/addressbook/printing/e-contact-print.c @@ -310,7 +310,7 @@ contact_compare (EContact *contact1, EContact *contact2) field1 = e_contact_get_const (contact1, E_CONTACT_UID); field2 = e_contact_get_const (contact2, E_CONTACT_UID); - g_assert (field1 != NULL && field2 != NULL); + g_return_val_if_fail (field1 != NULL && field2 != NULL, (field1 != NULL) ? -1 : 1); return strcmp (field1, field2); } |