From 7de82ec291fe810b88e5cebb877b973e74481c78 Mon Sep 17 00:00:00 2001 From: rim Date: Wed, 30 May 2018 21:49:22 +0200 Subject: [PATCH] Better zeroing of found struct (bug 14401) --- src/process-tree-model.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/process-tree-model.c b/src/process-tree-model.c index 9602658..551a722 100644 --- a/src/process-tree-model.c +++ b/src/process-tree-model.c @@ -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);