aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/guc.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2022-10-04 13:16:23 +0900
committerMichael Paquier <michael@paquier.xyz>2022-10-04 13:16:23 +0900
commitc42cd05c586235fa9e84fb4a3682286cf551df0e (patch)
treef5a86d3a3cfd8d49b12636fb60eb87283f97eb4c /src/backend/utils/misc/guc.c
parent62be9e4cdc1d59dd6c9c268c7419d7d4f1016124 (diff)
downloadpostgresql-c42cd05c586235fa9e84fb4a3682286cf551df0e.tar.gz
postgresql-c42cd05c586235fa9e84fb4a3682286cf551df0e.zip
Cleanup useless assignments and checks
This cleans up a couple of areas: - Remove XLogSegNo calculation for the last WAL segment in backup in xlog.c (7d70809 has moved this logic entirely to xlogbackup.c when building the contents of the backup history file). - Remove check on log_min_duration in analyze.c, as it is already true where this code path is reached. - Simplify call to find_option() in guc.c. Author: Ranier Vilela Reviewed-by: Masahiko Sawada Discussion: https://postgr.es/m/CAEudQArCDQQiPiFR16=yu9k5s2tp4tgEe1U1ZbkW4ofx81AWWQ@mail.gmail.com
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r--src/backend/utils/misc/guc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index ff082fc3d95..01357660359 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -5262,12 +5262,10 @@ read_nondefault_variables(void)
for (;;)
{
- struct config_generic *record;
-
if ((varname = read_string_with_null(fp)) == NULL)
break;
- if ((record = find_option(varname, true, false, FATAL)) == NULL)
+ if (find_option(varname, true, false, FATAL) == NULL)
elog(FATAL, "failed to locate variable \"%s\" in exec config params file", varname);
if ((varvalue = read_string_with_null(fp)) == NULL)