diff --git a/src/halfvec.c b/src/halfvec.c index b1400dd..1781100 100644 --- a/src/halfvec.c +++ b/src/halfvec.c @@ -32,7 +32,7 @@ #endif #define STATE_DIMS(x) (ARR_DIMS(x)[0] - 1) -#define CreateStateDatums(dim) palloc_array(Datum, (dim + 1)) +#define CreateStateDatums(dim) palloc_array(Datum, (dim) + 1) /* * Get a half from a message buffer diff --git a/src/vector.c b/src/vector.c index 09ecf9c..dc13397 100644 --- a/src/vector.c +++ b/src/vector.c @@ -35,7 +35,7 @@ #endif #define STATE_DIMS(x) (ARR_DIMS(x)[0] - 1) -#define CreateStateDatums(dim) palloc_array(Datum, (dim + 1)) +#define CreateStateDatums(dim) palloc_array(Datum, (dim) + 1) #if defined(USE_TARGET_CLONES) && !defined(__FMA__) #define VECTOR_TARGET_CLONES __attribute__((target_clones("default", "fma")))