[Xfce4-commits] [apps/xfce4-taskmanager] 12/20: Better zeroing of found struct (bug 14401)

noreply at xfce.org noreply at xfce.org
Wed May 30 22:00:26 CEST 2018


This is an automated email from the git hooks/post-receive script.

l   a   n   d   r   y       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-taskmanager.

commit 7de82ec291fe810b88e5cebb877b973e74481c78
Author: rim <rozhuk.im at gmail.com>
Date:   Wed May 30 21:49:22 2018 +0200

    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);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list