From 689de0e8e4462116df9e918adce5b1c2eb056bf5 Mon Sep 17 00:00:00 2001 From: leitner Date: Fri, 26 Jan 2007 01:29:00 +0000 Subject: [PATCH] more brackets in macros (paranoia) --- rangecheck.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rangecheck.h b/rangecheck.h index 55a0684..305b2be 100644 --- a/rangecheck.h +++ b/rangecheck.h @@ -83,7 +83,7 @@ int range_str4inbuf(const void* buf,size_t len,const void* stringstart); #define __MAX(type) ((type)-1 < 1?__MAX_SIGNED(type):__MAX_UNSIGNED(type)) #define __MIN(type) ((type)-1 < 1?__MIN_SIGNED(type):__MIN_UNSIGNED(type)) -#define assign(dest,src) ({ typeof(src) __x=src; typeof(dest) __y=__x; (__x==__y && ((__x<1) == (__y<1))?(int)(dest=__y),0:1); }) +#define assign(dest,src) ({ typeof(src) __x=(src); typeof(dest) __y=__x; (__x==__y && ((__x<1) == (__y<1))?(int)((dest)=__y),0:1); }) /* if a+b is defined and does not have an integer overflow, do c=a+b and * return 0. Otherwise, return 1. */