diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-11-10 07:25:14 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-11-10 07:25:14 +0000 |
commit | 8fee9615ccdfb7ed99de3dfe0d964952ed45d978 (patch) | |
tree | b13cf68a8e97d5e89a106fd7da9c3b524ad7a8c2 /contrib/intarray/_int.c | |
parent | 78822b328c2907accf590d5473a0508ea3ee07a5 (diff) | |
download | postgresql-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.c | 4 |
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; |