summaryrefslogtreecommitdiff
path: root/src/backend/bootstrap/bootstrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r--src/backend/bootstrap/bootstrap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index fc8638c1b61..4986b1ea7ed 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -742,7 +742,7 @@ populate_typ_list(void)
Form_pg_type typForm = (Form_pg_type) GETSTRUCT(tup);
struct typmap *newtyp;
- newtyp = (struct typmap *) palloc(sizeof(struct typmap));
+ newtyp = palloc_object(struct typmap);
Typ = lappend(Typ, newtyp);
newtyp->am_oid = typForm->oid;
@@ -951,10 +951,10 @@ index_register(Oid heap,
oldcxt = MemoryContextSwitchTo(nogc);
- newind = (IndexList *) palloc(sizeof(IndexList));
+ newind = palloc_object(IndexList);
newind->il_heap = heap;
newind->il_ind = ind;
- newind->il_info = (IndexInfo *) palloc(sizeof(IndexInfo));
+ newind->il_info = palloc_object(IndexInfo);
memcpy(newind->il_info, indexInfo, sizeof(IndexInfo));
/* expressions will likely be null, but may as well copy it */