1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +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

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/opclasscmds.c,v 1.6 2002/10/04 22:19:29 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/opclasscmds.c,v 1.7 2002/11/10 07:25:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -124,12 +124,9 @@ DefineOpClass(CreateOpClassStmt *stmt)
* do this mainly so that we can detect duplicate strategy numbers and
* support-proc numbers.
*/
operators = (Oid *) palloc(sizeof(Oid) * numOperators);
MemSet(operators, 0, sizeof(Oid) * numOperators);
procedures = (Oid *) palloc(sizeof(Oid) * numProcs);
MemSet(procedures, 0, sizeof(Oid) * numProcs);
recheck = (bool *) palloc(sizeof(bool) * numOperators);
MemSet(recheck, 0, sizeof(bool) * numOperators);
operators = (Oid *) palloc0(sizeof(Oid) * numOperators);
procedures = (Oid *) palloc0(sizeof(Oid) * numProcs);
recheck = (bool *) palloc0(sizeof(bool) * numOperators);
/*
* Scan the "items" list to obtain additional info.