aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/rmgr.c
diff options
context:
space:
mode:
authorJeff Davis <jdavis@postgresql.org>2022-04-07 00:27:07 -0700
committerJeff Davis <jdavis@postgresql.org>2022-04-07 00:39:30 -0700
commit9553b4115f1879f66935f42fff0b798ef91866d0 (patch)
tree12a7f2e31a7b9e2d003b5a50513bf2b82fdeec80 /src/backend/access/transam/rmgr.c
parente349c95d3e91754c8c3afc0587d52d44a479c8d2 (diff)
downloadpostgresql-9553b4115f1879f66935f42fff0b798ef91866d0.tar.gz
postgresql-9553b4115f1879f66935f42fff0b798ef91866d0.zip
Fix warning introduced in 5c279a6d350.
Change two macros to be static inline functions instead to keep the data type consistent. This avoids a "comparison is always true" warning that was occurring with -Wtype-limits. In the process, change the names to look less like macros. Discussion: https://postgr.es/m/20220407063505.njnnrmbn4sxqfsts@alap3.anarazel.de
Diffstat (limited to 'src/backend/access/transam/rmgr.c')
-rw-r--r--src/backend/access/transam/rmgr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/transam/rmgr.c b/src/backend/access/transam/rmgr.c
index 3c2dc1000db..e1d6ebbd3db 100644
--- a/src/backend/access/transam/rmgr.c
+++ b/src/backend/access/transam/rmgr.c
@@ -101,7 +101,7 @@ RegisterCustomRmgr(RmgrId rmid, RmgrData *rmgr)
ereport(ERROR, (errmsg("custom resource manager name is invalid"),
errhint("Provide a non-empty name for the custom resource manager.")));
- if (!RMID_IS_CUSTOM(rmid))
+ if (!RmgrIdIsCustom(rmid))
ereport(ERROR, (errmsg("custom resource manager ID %d is out of range", rmid),
errhint("Provide a custom resource manager ID between %d and %d.",
RM_MIN_CUSTOM_ID, RM_MAX_CUSTOM_ID)));
@@ -153,7 +153,7 @@ pg_get_wal_resource_managers(PG_FUNCTION_ARGS)
continue;
values[0] = Int32GetDatum(rmid);
values[1] = CStringGetTextDatum(GetRmgr(rmid).rm_name);
- values[2] = BoolGetDatum(RMID_IS_BUILTIN(rmid));
+ values[2] = BoolGetDatum(RmgrIdIsBuiltin(rmid));
tuplestore_putvalues(rsinfo->setResult, rsinfo->setDesc, values, nulls);
}