diff options
Diffstat (limited to 'contrib/intarray/_int_bool.c')
| -rw-r--r-- | contrib/intarray/_int_bool.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/intarray/_int_bool.c b/contrib/intarray/_int_bool.c index 2b2c3f4029e..f45df86d60c 100644 --- a/contrib/intarray/_int_bool.c +++ b/contrib/intarray/_int_bool.c @@ -135,7 +135,7 @@ gettoken(WORKSTATE *state, int32 *val) static void pushquery(WORKSTATE *state, int32 type, int32 val) { - NODE *tmp = (NODE *) palloc(sizeof(NODE)); + NODE *tmp = palloc_object(NODE); tmp->type = type; tmp->val = val; @@ -346,7 +346,7 @@ gin_bool_consistent(QUERYTYPE *query, bool *check) * extraction code in ginint4_queryextract. */ gcv.first = items; - gcv.mapped_check = (bool *) palloc(sizeof(bool) * query->size); + gcv.mapped_check = palloc_array(bool, query->size); for (i = 0; i < query->size; i++) { if (items[i].type == VAL) @@ -613,7 +613,7 @@ infix(INFIX *in, bool first) nrm.curpol = in->curpol; nrm.buflen = 16; - nrm.cur = nrm.buf = (char *) palloc(sizeof(char) * nrm.buflen); + nrm.cur = nrm.buf = palloc_array(char, nrm.buflen); /* get right operand */ infix(&nrm, false); @@ -651,7 +651,7 @@ bqarr_out(PG_FUNCTION_ARGS) nrm.curpol = GETQUERY(query) + query->size - 1; nrm.buflen = 32; - nrm.cur = nrm.buf = (char *) palloc(sizeof(char) * nrm.buflen); + nrm.cur = nrm.buf = palloc_array(char, nrm.buflen); *(nrm.cur) = '\0'; infix(&nrm, true); |
