diff options
Diffstat (limited to 'contrib/tsearch2/query.h')
-rw-r--r-- | contrib/tsearch2/query.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/tsearch2/query.h b/contrib/tsearch2/query.h index a65dbca762f..3ac757a1621 100644 --- a/contrib/tsearch2/query.h +++ b/contrib/tsearch2/query.h @@ -33,10 +33,10 @@ typedef struct char data[1]; } QUERYTYPE; -#define HDRSIZEQT ( 2*sizeof(int4) ) -#define COMPUTESIZE(size,lenofoperand) ( HDRSIZEQT + size * sizeof(ITEM) + lenofoperand ) +#define HDRSIZEQT ( 2 * sizeof(int4) ) +#define COMPUTESIZE(size,lenofoperand) ( HDRSIZEQT + (size) * sizeof(ITEM) + (lenofoperand) ) #define GETQUERY(x) (ITEM*)( (char*)(x)+HDRSIZEQT ) -#define GETOPERAND(x) ( (char*)GETQUERY(x) + ((QUERYTYPE*)x)->size * sizeof(ITEM) ) +#define GETOPERAND(x) ( (char*)GETQUERY(x) + ((QUERYTYPE*)(x))->size * sizeof(ITEM) ) #define ISOPERATOR(x) ( (x)=='!' || (x)=='&' || (x)=='|' || (x)=='(' || (x)==')' ) |