changeset 18405:69cc1a4ef6ab

Parentheses helps.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 01 Jul 2007 14:04:35 +0000
parents 9a0f99ea664d
children 29e48078a899
files finch/libgnt/gnttree.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gnttree.c	Sun Jul 01 12:21:30 2007 +0000
+++ b/finch/libgnt/gnttree.c	Sun Jul 01 14:04:35 2007 +0000
@@ -82,7 +82,7 @@
 {
 	int i, col, total;
 	int width;
-#define WIDTH(i) tree->columns[i].width_ratio ? tree->columns[i].width_ratio : tree->columns[i].width
+#define WIDTH(i) (tree->columns[i].width_ratio ? tree->columns[i].width_ratio : tree->columns[i].width)
 	gnt_widget_get_size(GNT_WIDGET(tree), &width, NULL);
 	for (i = 0, total = 0; i < tree->ncol ; i++) {
 		if (tree->columns[i].flags & GNT_TREE_COLUMN_INVISIBLE)
@@ -102,7 +102,7 @@
 		if (tree->columns[i].flags & GNT_TREE_COLUMN_FIXED_SIZE)
 			col = WIDTH(i);
 		else
-			col = WIDTH(i) * width / total;
+			col = (WIDTH(i) * width) / total;
 		gnt_tree_set_col_width(GNT_TREE(tree), i, col);
 	}
 }