mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Inline memset() as MemSet().
This commit is contained in:
@ -26,7 +26,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.25 1997/09/08 21:42:57 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.26 1997/09/18 20:20:29 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1286,7 +1286,7 @@ ExecAttrDefault(Relation rel, HeapTuple tuple)
|
||||
repl = (char *) palloc(rel->rd_att->natts * sizeof(char));
|
||||
replNull = (char *) palloc(rel->rd_att->natts * sizeof(char));
|
||||
replValue = (Datum *) palloc(rel->rd_att->natts * sizeof(Datum));
|
||||
memset(repl, ' ', rel->rd_att->natts * sizeof(char));
|
||||
MemSet(repl, ' ', rel->rd_att->natts * sizeof(char));
|
||||
}
|
||||
|
||||
repl[attrdef[i].adnum - 1] = 'r';
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.9 1997/09/08 21:43:03 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.10 1997/09/18 20:20:32 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -174,7 +174,7 @@ ExecCreateTupleTable(int initialSize) /* initial number of slots in
|
||||
* clean out the slots we just allocated
|
||||
* ----------------
|
||||
*/
|
||||
memset(array, 0, initialSize * sizeof(TupleTableSlot));
|
||||
MemSet(array, 0, initialSize * sizeof(TupleTableSlot));
|
||||
|
||||
/* ----------------
|
||||
* initialize the new table and return it to the caller.
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.18 1997/09/08 21:43:05 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.19 1997/09/18 20:20:35 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -516,7 +516,7 @@ ExecSetTypeInfo(int index,
|
||||
if (attName != (char *) NULL)
|
||||
strNcpy(att->attname.data, attName, NAMEDATALEN - 1);
|
||||
else
|
||||
memset(att->attname.data, 0, NAMEDATALEN);
|
||||
MemSet(att->attname.data, 0, NAMEDATALEN);
|
||||
|
||||
att->atttypid = typeID;
|
||||
att->attdefrel = 0; /* dummy value */
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.11 1997/09/12 04:07:41 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.12 1997/09/18 20:20:37 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -142,7 +142,7 @@ init_execution_state(FunctionCachePtr fcache,
|
||||
paramLI =
|
||||
(ParamListInfo) palloc((nargs + 1) * sizeof(ParamListInfoData));
|
||||
|
||||
memset(paramLI, 0, nargs * sizeof(ParamListInfoData));
|
||||
MemSet(paramLI, 0, nargs * sizeof(ParamListInfoData));
|
||||
|
||||
estate->es_param_list_info = paramLI;
|
||||
|
||||
|
@ -128,13 +128,13 @@ ExecAgg(Agg *node)
|
||||
nulls = node->aggstate->csstate.cstate.cs_ExprContext->ecxt_nulls;
|
||||
|
||||
value2 = (Datum *) palloc(sizeof(Datum) * nagg);
|
||||
memset(value2, 0, sizeof(Datum) * nagg);
|
||||
MemSet(value2, 0, sizeof(Datum) * nagg);
|
||||
|
||||
aggFuncInfo = (AggFuncInfo *) palloc(sizeof(AggFuncInfo) * nagg);
|
||||
memset(aggFuncInfo, 0, sizeof(AggFuncInfo) * nagg);
|
||||
MemSet(aggFuncInfo, 0, sizeof(AggFuncInfo) * nagg);
|
||||
|
||||
noInitValue = (int *) palloc(sizeof(int) * nagg);
|
||||
memset(noInitValue, 0, sizeof(noInitValue) * nagg);
|
||||
MemSet(noInitValue, 0, sizeof(noInitValue) * nagg);
|
||||
|
||||
outerPlan = outerPlan(node);
|
||||
oneTuple = NULL;
|
||||
@ -524,9 +524,9 @@ ExecInitAgg(Agg *node, EState *estate, Plan *parent)
|
||||
econtext = aggstate->csstate.cstate.cs_ExprContext;
|
||||
econtext->ecxt_values =
|
||||
(Datum *) palloc(sizeof(Datum) * node->numAgg);
|
||||
memset(econtext->ecxt_values, 0, sizeof(Datum) * node->numAgg);
|
||||
MemSet(econtext->ecxt_values, 0, sizeof(Datum) * node->numAgg);
|
||||
econtext->ecxt_nulls = (char *) palloc(node->numAgg);
|
||||
memset(econtext->ecxt_nulls, 0, node->numAgg);
|
||||
MemSet(econtext->ecxt_nulls, 0, node->numAgg);
|
||||
|
||||
/*
|
||||
* initializes child nodes
|
||||
|
Reference in New Issue
Block a user