aboutsummaryrefslogtreecommitdiff
path: root/contrib/intarray/_int.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-11-10 07:25:14 +0000
committerBruce Momjian <bruce@momjian.us>2002-11-10 07:25:14 +0000
commit8fee9615ccdfb7ed99de3dfe0d964952ed45d978 (patch)
treeb13cf68a8e97d5e89a106fd7da9c3b524ad7a8c2 /contrib/intarray/_int.c
parent78822b328c2907accf590d5473a0508ea3ee07a5 (diff)
downloadpostgresql-8fee9615ccdfb7ed99de3dfe0d964952ed45d978.tar.gz
postgresql-8fee9615ccdfb7ed99de3dfe0d964952ed45d978.zip
Merge palloc()/MemSet(0) calls into a single palloc0() call.
Diffstat (limited to 'contrib/intarray/_int.c')
-rw-r--r--contrib/intarray/_int.c4
1 files changed, 1 insertions, 3 deletions
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;