From: Heikki Linnakangas Date: Tue, 30 Jul 2024 19:05:59 +0000 (+0300) Subject: Replace static buf with a stack-allocated one in ReadControlFile X-Git-Tag: REL_18_BETA1~2250 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=da8a587e2e225be1ccf838a330e342bda6848874;p=postgresql.git Replace static buf with a stack-allocated one in ReadControlFile It's only used very locally within the function. Reviewed-by: Robert Haas Discussion: https://www.postgresql.org/message-id/7f86e06a-98c5-4ce3-8ec9-3885c8de0358@iki.fi --- diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 75463e153ec..4a8a2f6098f 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -4314,7 +4314,7 @@ ReadControlFile(void) { pg_crc32c crc; int fd; - static char wal_segsz_str[20]; + char wal_segsz_str[20]; int r; /*