From 9b12ab6d5dd6c40ac112456c820a8dc199fc6e16 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 13 Nov 2002 00:39:48 +0000 Subject: Add new palloc0 call as merge of palloc and MemSet(0). --- contrib/intarray/_int.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'contrib/intarray/_int.c') diff --git a/contrib/intarray/_int.c b/contrib/intarray/_int.c index dc674e09ff8..325d504d849 100644 --- a/contrib/intarray/_int.c +++ b/contrib/intarray/_int.c @@ -916,10 +916,8 @@ new_intArrayType(int num) ArrayType *r; int nbytes = ARR_OVERHEAD(NDIM) + sizeof(int) * num; - r = (ArrayType *) palloc(nbytes); + r = (ArrayType *) palloc0(nbytes); - MemSet(r, 0, nbytes); - ARR_SIZE(r) = nbytes; ARR_NDIM(r) = NDIM; ARR_ELEMTYPE(r) = INT4OID; -- cgit v1.2.3