[Xfce4-commits] [apps/xfce4-taskmanager] 01/03: please cppcheck, check for i < N_COLUMNS before using i to access the array (#10664)

noreply at xfce.org noreply at xfce.org
Sun Nov 30 21:48:35 CET 2014


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

landry pushed a commit to branch master
in repository apps/xfce4-taskmanager.

commit 095098f87bc390cbe4a29ccf0a296f25e2b7247d
Author: Landry Breuil <landry at xfce.org>
Date:   Sun Nov 30 21:48:02 2014 +0100

    please cppcheck, check for i < N_COLUMNS before using i to access the array (#10664)
---
 src/process-tree-view.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/process-tree-view.c b/src/process-tree-view.c
index 37ec367..5026679 100644
--- a/src/process-tree-view.c
+++ b/src/process-tree-view.c
@@ -311,7 +311,7 @@ read_columns_positions (XtmProcessTreeView *treeview)
 	else
 	{
 		columns_positions_split = g_strsplit (columns_positions, ";", N_COLUMNS + 1);
-		for (i = 0; columns_positions_split[i] != NULL && i < N_COLUMNS; i++)
+		for (i = 0; i < N_COLUMNS && columns_positions_split[i] != NULL; i++)
 			treeview->columns_positions[i] = (gint)g_ascii_strtoll (columns_positions_split[i], NULL, 10);
 		g_strfreev (columns_positions_split);
 		g_free (columns_positions);

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


More information about the Xfce4-commits mailing list