diff options
author | Milan Crha <mcrha@redhat.com> | 2012-11-30 22:29:34 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-11-30 22:30:45 +0800 |
commit | ab3f65a15e1b6fe5bdf488e6e879899e283ccc43 (patch) | |
tree | ac594d423506e1fa1d47fbf057a1ec71947bf7a5 /widgets/table/gal-a11y-e-cell.c | |
parent | 1eb7481305d0feda31538d072c206aab5dbdeabd (diff) | |
download | gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.tar.gz gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.tar.zst gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.zip |
Address couple issues found by a Coverity scan
Diffstat (limited to 'widgets/table/gal-a11y-e-cell.c')
-rw-r--r-- | widgets/table/gal-a11y-e-cell.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/widgets/table/gal-a11y-e-cell.c b/widgets/table/gal-a11y-e-cell.c index d42aa6425f..3972c2de16 100644 --- a/widgets/table/gal-a11y-e-cell.c +++ b/widgets/table/gal-a11y-e-cell.c @@ -350,20 +350,17 @@ gal_a11y_e_cell_remove_action_by_name (GalA11yECell *cell, const gchar *action_name) { GList *list_node; - gboolean action_found= FALSE; g_return_val_if_fail (GAL_A11Y_IS_E_CELL (cell), FALSE); - for (list_node = cell->action_list; list_node && !action_found; - list_node = list_node->next) { - if (!g_ascii_strcasecmp ( - ((ActionInfo *)(list_node->data))->name, - action_name)) { - action_found = TRUE; + + for (list_node = cell->action_list; list_node; list_node = list_node->next) { + if (!g_ascii_strcasecmp (((ActionInfo *)(list_node->data))->name, action_name)) { break; } } - g_return_val_if_fail (action_found, FALSE); + g_return_val_if_fail (list_node != NULL, FALSE); + _gal_a11y_e_cell_destroy_action_info (list_node->data, NULL); cell->action_list = g_list_remove_link (cell->action_list, list_node); |