1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-09 06:21:09 +03:00

Modernize some for loops

in guc-related source files, in anticipation of some further
restructuring.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/8fdfb91e-60fb-44fa-8df6-f5dea47353c9@eisentraut.org
This commit is contained in:
Peter Eisentraut
2025-10-03 08:27:18 +02:00
parent 594ba21bce
commit 1a79518888
3 changed files with 53 additions and 90 deletions

View File

@@ -986,7 +986,6 @@ show_all_file_settings(PG_FUNCTION_ARGS)
#define NUM_PG_FILE_SETTINGS_ATTS 7
ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
ConfigVariable *conf;
int seqno;
/* Scan the config files using current context as workspace */
conf = ProcessConfigFileInternal(PGC_SIGHUP, false, DEBUG3);
@@ -995,7 +994,7 @@ show_all_file_settings(PG_FUNCTION_ARGS)
InitMaterializedSRF(fcinfo, 0);
/* Process the results and create a tuplestore */
for (seqno = 1; conf != NULL; conf = conf->next, seqno++)
for (int seqno = 1; conf != NULL; conf = conf->next, seqno++)
{
Datum values[NUM_PG_FILE_SETTINGS_ATTS];
bool nulls[NUM_PG_FILE_SETTINGS_ATTS];