Skip to content

Commit 06c28a2

Browse files
committed
Use currentChar in ScrubUserMappingSecrets for readability
Signed-off-by: sfc-gh-npuka <naisila.puka@snowflake.com>
1 parent 4946ad4 commit 06c28a2

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

pg_lake_iceberg/src/rest_catalog/rest_catalog.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -261,30 +261,30 @@ ScrubUserMappingSecrets(const char *queryString, List *options)
261261
if (def->location < 0)
262262
continue;
263263

264-
char *p = (char *) queryString + def->location;
264+
char *currentChar = (char *) queryString + def->location;
265265

266266
/* skip past the key name */
267-
while (*p && !isspace((unsigned char) *p) && *p != '\'')
268-
p++;
267+
while (*currentChar && !isspace((unsigned char) *currentChar) && *currentChar != '\'')
268+
currentChar++;
269269

270270
/* skip whitespace between key and opening quote */
271-
while (*p && *p != '\'')
272-
p++;
271+
while (*currentChar && *currentChar != '\'')
272+
currentChar++;
273273

274-
if (*p != '\'')
274+
if (*currentChar != '\'')
275275
continue;
276276

277-
p++; /* skip opening quote */
277+
currentChar++; /* skip opening quote */
278278

279279
/* overwrite value characters with '*', handling '' escapes */
280-
while (*p && *p != '\'')
281-
*p++ = '*';
282-
while (*(p + 1) == '\'')
280+
while (*currentChar && *currentChar != '\'')
281+
*currentChar++ = '*';
282+
while (*(currentChar + 1) == '\'')
283283
{
284-
*p++ = '*'; /* first quote of '' pair */
285-
*p++ = '*'; /* second quote of '' pair */
286-
while (*p && *p != '\'')
287-
*p++ = '*';
284+
*currentChar++ = '*'; /* first quote of '' pair */
285+
*currentChar++ = '*'; /* second quote of '' pair */
286+
while (*currentChar && *currentChar != '\'')
287+
*currentChar++ = '*';
288288
}
289289
}
290290
}

0 commit comments

Comments
 (0)