diff options
author | Bruce Momjian <bruce@momjian.us> | 2005-05-25 21:40:43 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2005-05-25 21:40:43 +0000 |
commit | b492c3acccb3f8c97559ddfc2a25f25953a026d2 (patch) | |
tree | a9c42aa2bd86a88a849ffaa005766ffe3dee762a /contrib/intarray | |
parent | 13b729ca5267b58005f1ca9c873a86c2b0db3591 (diff) | |
download | postgresql-b492c3acccb3f8c97559ddfc2a25f25953a026d2.tar.gz postgresql-b492c3acccb3f8c97559ddfc2a25f25953a026d2.zip |
Add parentheses to macros when args are used in computations. Without
them, the executation behavior could be unexpected.
Diffstat (limited to 'contrib/intarray')
-rw-r--r-- | contrib/intarray/_int_bool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/intarray/_int_bool.c b/contrib/intarray/_int_bool.c index d57a94e8709..06759c44e34 100644 --- a/contrib/intarray/_int_bool.c +++ b/contrib/intarray/_int_bool.c @@ -466,7 +466,7 @@ typedef struct int4 buflen; } INFIX; -#define RESIZEBUF(inf,addsize) while( ( inf->cur - inf->buf ) + addsize + 1 >= inf->buflen ) { \ +#define RESIZEBUF(inf,addsize) while( ( (inf)->cur - (inf)->buf ) + (addsize) + 1 >= (inf)->buflen ) { \ int4 len = inf->cur - inf->buf; \ inf->buflen *= 2; \ inf->buf = (char*) repalloc( (void*)inf->buf, inf->buflen ); \ |