1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

Add new palloc0 call as merge of palloc and MemSet(0).

This commit is contained in:
Bruce Momjian
2002-11-13 00:39:48 +00:00
parent aaa3a0caa6
commit 9b12ab6d5d
37 changed files with 107 additions and 210 deletions

View File

@ -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;