diff options
author | Emanuele Torre <torreemanuele6@gmail.com> | 2024-03-20 00:22:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-20 00:22:54 +0100 |
commit | b6da71bf681857b945501774c956634f2852bab7 (patch) | |
tree | b68a74adeb772b1d7f49d14c68c0e89f7a3195b2 /src/jv_print.c | |
parent | bc9614682571fa2e8185398c89322c0300f92f76 (diff) |
declare static arrays const where possible
Some static arrays that could be readonly memory were declared mutable.
Diffstat (limited to 'src/jv_print.c')
-rw-r--r-- | src/jv_print.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jv_print.c b/src/jv_print.c index 44ff36f3..390b38c9 100644 --- a/src/jv_print.c +++ b/src/jv_print.c @@ -29,12 +29,12 @@ // the last color is used for object keys. static char color_bufs[8][16]; static const char *color_bufps[8]; -static const char* def_colors[] = +static const char *const def_colors[] = {COL("0;90"), COL("0;39"), COL("0;39"), COL("0;39"), COL("0;32"), COL("1;39"), COL("1;39"), COL("1;34")}; #define FIELD_COLOR (colors[7]) -static const char **colors = def_colors; +static const char *const *colors = def_colors; int jq_set_colors(const char *c) |