summaryrefslogtreecommitdiff
path: root/src/backend/nodes/readfuncs.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-11-25 15:38:23 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-11-25 15:38:23 +0100
commit2256af4ba223e114d08208fd17a27cbce30cda9e (patch)
tree696a1024dde212735aa2b6012a36f56dc0b5b25a /src/backend/nodes/readfuncs.c
parent3df4df53b06df2a2af56a77bf44cffa6393534fe (diff)
backend/nodes cleanup: Move loop variables definitions into for statement
Author: Chao Li (Evan) <lic@highgo.com> Discussion: https://www.postgresql.org/message-id/flat/CAEoWx2nP12qwAaiJutbn1Kw50atN6FbMJNQ4bh4%2BfP_Ay_u7Eg%40mail.gmail.com
Diffstat (limited to 'src/backend/nodes/readfuncs.c')
-rw-r--r--src/backend/nodes/readfuncs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c
index 2f933e95cb9..9a8ca27ec10 100644
--- a/src/backend/nodes/readfuncs.c
+++ b/src/backend/nodes/readfuncs.c
@@ -599,8 +599,7 @@ parseNodeString(void)
Datum
readDatum(bool typbyval)
{
- Size length,
- i;
+ Size length;
int tokenLength;
const char *token;
Datum res;
@@ -623,7 +622,7 @@ readDatum(bool typbyval)
elog(ERROR, "byval datum but length = %zu", length);
res = (Datum) 0;
s = (char *) (&res);
- for (i = 0; i < (Size) sizeof(Datum); i++)
+ for (Size i = 0; i < (Size) sizeof(Datum); i++)
{
token = pg_strtok(&tokenLength);
s[i] = (char) atoi(token);
@@ -634,7 +633,7 @@ readDatum(bool typbyval)
else
{
s = (char *) palloc(length);
- for (i = 0; i < length; i++)
+ for (Size i = 0; i < length; i++)
{
token = pg_strtok(&tokenLength);
s[i] = (char) atoi(token);