summaryrefslogtreecommitdiff
path: root/src/backend/bootstrap/bootstrap.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-05-12 13:14:10 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-05-12 13:14:10 -0400
commitdef5b065ff22a16a80084587613599fe15627213 (patch)
tree13f424449b7fb90c85659071b6adf4e27ae6d272 /src/backend/bootstrap/bootstrap.c
parente6ccd1ce1644d1b40b7981f8bc172394de524f99 (diff)
Initial pgindent and pgperltidy run for v14.
Also "make reformat-dat-files". The only change worthy of note is that pgindent messed up the formatting of launcher.c's struct LogicalRepWorkerId, which led me to notice that that struct wasn't used at all anymore, so I just took it out.
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r--src/backend/bootstrap/bootstrap.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index 174727b501d..b1552374884 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -160,7 +160,7 @@ struct typmap
FormData_pg_type am_typ;
};
-static List *Typ = NIL; /* List of struct typmap* */
+static List *Typ = NIL; /* List of struct typmap* */
static struct typmap *Ap = NULL;
static Datum values[MAXATTR]; /* current row's attribute values */
@@ -926,11 +926,12 @@ gettype(char *type)
{
if (Typ != NIL)
{
- ListCell *lc;
+ ListCell *lc;
- foreach (lc, Typ)
+ foreach(lc, Typ)
{
struct typmap *app = lfirst(lc);
+
if (strncmp(NameStr(app->am_typ.typname), type, NAMEDATALEN) == 0)
{
Ap = app;
@@ -948,12 +949,13 @@ gettype(char *type)
populate_typ_list();
/*
- * Calling gettype would result in infinite recursion for types missing
- * in pg_type, so just repeat the lookup.
+ * Calling gettype would result in infinite recursion for types
+ * missing in pg_type, so just repeat the lookup.
*/
- foreach (lc, Typ)
+ foreach(lc, Typ)
{
struct typmap *app = lfirst(lc);
+
if (strncmp(NameStr(app->am_typ.typname), type, NAMEDATALEN) == 0)
{
Ap = app;
@@ -1004,9 +1006,9 @@ boot_get_type_io_data(Oid typid,
{
/* We have the boot-time contents of pg_type, so use it */
struct typmap *ap = NULL;
- ListCell *lc;
+ ListCell *lc;
- foreach (lc, Typ)
+ foreach(lc, Typ)
{
ap = lfirst(lc);
if (ap->am_oid == typid)