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:
@ -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;
|
||||
|
Reference in New Issue
Block a user