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. */