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

Merge palloc()/MemSet(0) calls into a single palloc0() call.

This commit is contained in:
Bruce Momjian
2002-11-10 07:25:14 +00:00
parent 78822b328c
commit 8fee9615cc
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;