1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Add parentheses to macros when args are used in computations. Without

them, the executation behavior could be unexpected.
This commit is contained in:
Bruce Momjian
2005-05-25 21:40:43 +00:00
parent 13b729ca52
commit b492c3accc
36 changed files with 211 additions and 211 deletions

View File

@ -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 ); \