Replace static buf with a stack-allocated one in ReadControlFile
authorHeikki Linnakangas <[email protected]>
Tue, 30 Jul 2024 19:05:59 +0000 (22:05 +0300)
committerHeikki Linnakangas <[email protected]>
Tue, 30 Jul 2024 19:05:59 +0000 (22:05 +0300)
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

src/backend/access/transam/xlog.c

index 75463e153ece6efc83066ce482538dc61a626325..4a8a2f6098f93daaab18ab9dd5404862db83d702 100644 (file)
@@ -4314,7 +4314,7 @@ ReadControlFile(void)
 {
    pg_crc32c   crc;
    int         fd;
-   static char wal_segsz_str[20];
+   char        wal_segsz_str[20];
    int         r;
 
    /*