From 0b602280819fbebed59651618c7e070306f7c0f4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 31 Oct 2024 19:53:25 -0700 Subject: [PATCH] checkpoint_total_format is now const * src/checkpoint.c (checkpoint_total_format): Now const, and local to format_checkpoint_string. --- src/checkpoint.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/checkpoint.c b/src/checkpoint.c index 573eff8d..c6200c69 100644 --- a/src/checkpoint.c +++ b/src/checkpoint.c @@ -168,12 +168,6 @@ checkpoint_finish_compile (void) } } -static const char *checkpoint_total_format[] = { - "R", - "W", - "D" -}; - static intmax_t getwidth (FILE *fp) { @@ -289,7 +283,9 @@ format_checkpoint_string (FILE *fp, idx_t len, case 'T': { - const char **fmt = checkpoint_total_format, *fmtbuf[3]; + static char const *const checkpoint_total_format[] + = { "R", "W", "D" }; + char const *const *fmt = checkpoint_total_format, *fmtbuf[3]; struct wordsplit ws; compute_duration_ns (); -- 2.47.2