From 8b2f8f9aebcbc5a1414dec92ff59352fc5467f32 Mon Sep 17 00:00:00 2001 From: Marius Tolzmann Date: Tue, 29 Nov 2011 15:34:51 +0100 Subject: [PATCH] bee-dep: fix some macros --- src/beedep_tree.c | 2 +- src/graph.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/beedep_tree.c b/src/beedep_tree.c index 39b2417..a11b433 100644 --- a/src/beedep_tree.c +++ b/src/beedep_tree.c @@ -31,7 +31,7 @@ #include "beedep_tree.h" #define MAX(a, b) (((a) > (b)) ? (a) : (b)) -#define ABS(a) (((a) < 0) ? (-a) : (a)) +#define ABS(a) (((a) < 0) ? (-(a)) : (a)) struct tree *tree_new(void) { diff --git a/src/graph.h b/src/graph.h index c8e3389..964b83d 100644 --- a/src/graph.h +++ b/src/graph.h @@ -37,7 +37,7 @@ #define IS_FILE(a) ((a)[0] == '/') #define IS_DIR(a) (!strcmp((a)->type, DIR)) -#define IS_WHITESPACE(a) (a == ' ' || a == '\t' || a == '\n' || a == '\r') +#define IS_WHITESPACE(a) ((a) == ' ' || (a) == '\t' || (a) == '\n' || (a) == '\r') #define IS_PKG(a) (!strcmp((a)->type, PACKAGE)) #include "hash.h"