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/e-tree.c | |
parent | 1eb7481305d0feda31538d072c206aab5dbdeabd (diff) | |
download | gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.tar gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.tar.gz gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.tar.bz2 gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.tar.lz gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.tar.xz gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.tar.zst gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.zip |
Address couple issues found by a Coverity scan
Diffstat (limited to 'widgets/table/e-tree.c')
-rw-r--r-- | widgets/table/e-tree.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index 3f3351d840..78eef72746 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -1678,7 +1678,7 @@ et_real_construct (ETree *e_tree, g_object_unref (ete); - return e_tree != NULL; + return TRUE; } /** @@ -2319,7 +2319,9 @@ ETreePath e_tree_node_at_row (ETree *et, gint row) { - ETreePath path; + ETreePath path = { 0 }; + + g_return_val_if_fail (et != NULL, path); path = e_tree_table_adapter_node_at_row (et->priv->etta, row); @@ -2330,12 +2332,16 @@ gint e_tree_row_of_node (ETree *et, ETreePath path) { + g_return_val_if_fail (et != NULL, -1); + return e_tree_table_adapter_row_of_node (et->priv->etta, path); } gboolean e_tree_root_node_is_visible (ETree *et) { + g_return_val_if_fail (et != NULL, FALSE); + return e_tree_table_adapter_root_node_is_visible (et->priv->etta); } @@ -2363,6 +2369,8 @@ void e_tree_load_expanded_state (ETree *et, gchar *filename) { + g_return_if_fail (et != NULL); + e_tree_table_adapter_load_expanded_state (et->priv->etta, filename); } @@ -2393,18 +2401,24 @@ void e_tree_force_expanded_state (ETree *et, gint state) { + g_return_if_fail (et != NULL); + e_tree_table_adapter_force_expanded_state (et->priv->etta, state); } gint e_tree_row_count (ETree *et) { + g_return_val_if_fail (et != NULL, -1); + return e_table_model_row_count (E_TABLE_MODEL (et->priv->etta)); } GtkWidget * e_tree_get_tooltip (ETree *et) { + g_return_val_if_fail (et != NULL, NULL); + return E_CANVAS (et->priv->table_canvas)->tooltip_window; } |