diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-11-13 00:39:48 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-11-13 00:39:48 +0000 |
commit | 9b12ab6d5dd6c40ac112456c820a8dc199fc6e16 (patch) | |
tree | 9ee7a9977161f5343d4ffcf6b8c5453c963aae2e /contrib/intarray/_int.c | |
parent | aaa3a0caa6c3e4dacd950e2dc3c1691222c50965 (diff) | |
download | postgresql-9b12ab6d5dd6c40ac112456c820a8dc199fc6e16.tar.gz postgresql-9b12ab6d5dd6c40ac112456c820a8dc199fc6e16.zip |
Add new palloc0 call as merge of palloc and MemSet(0).
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; |