Better zeroing of found struct (bug 14401)

This commit is contained in:
rim
2018-05-30 21:49:22 +02:00
committed by Landry Breuil
parent ce69b96ce4
commit 7de82ec291

View File

@@ -445,7 +445,7 @@ xtm_process_tree_model_row_changed (XtmProcessTreeModel *treemodel, GtkTreePath
GtkTreeIter s_iter;
XtmCrossLink *lnk, *c_link;
GNode *node, *next_node, *old_parent;
struct find_node_struct found = {{0}};
struct find_node_struct found;
GValue c_value = {0};
GValue p_value = {0};
gboolean same = TRUE;
@@ -464,6 +464,7 @@ xtm_process_tree_model_row_changed (XtmProcessTreeModel *treemodel, GtkTreePath
s_iter.user_data3 = NULL;
/* Use the root entry as fall-back if no parent could be found */
bzero(&found, sizeof(found));
found.parent = treemodel->tree;
found.treemodel = treemodel;
gtk_tree_model_get_value (model, iter, treemodel->p_column, &found.p_value);
@@ -608,7 +609,7 @@ xtm_process_tree_model_row_inserted (XtmProcessTreeModel *treemodel, GtkTreePath
GtkTreeIter s_iter;
XtmCrossLink *lnk, *c_link;
GNode *node, *next_node;
struct find_node_struct found = {{0}};
struct find_node_struct found;
GValue c_value = {0};
GValue p_value = {0};
gboolean same;
@@ -641,6 +642,7 @@ xtm_process_tree_model_row_inserted (XtmProcessTreeModel *treemodel, GtkTreePath
g_sequence_foreach_range (g_sequence_iter_next (lnk->list), g_sequence_get_end_iter (treemodel->list),
do_path, (gpointer)gtk_tree_path_next);
bzero(&found, sizeof(found));
found.parent = treemodel->tree;
found.treemodel = treemodel;
gtk_tree_model_get_value (model, iter, treemodel->p_column, &found.p_value);