From e6bd4c8acf389ce2667864e18efcebac3e954d01 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Mon, 27 Jul 2026 22:09:33 -0700 Subject: [PATCH] Improved CreateStateDatums [skip ci] --- src/halfvec.c | 2 +- src/vector.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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")))