]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
filter.c: Constify dummy variable.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 27 May 2025 19:19:30 +0000 (21:19 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 28 May 2025 17:23:40 +0000 (19:23 +0200)
It needs to be non-static, but it may be const because the amp filter
only reads the values of this array.

amp_filter.c
filter.c

index a5b222187fe7edd2f9a33e9e9da99c5a2113394a..8ca66decca50670c574fd24980887a959e7fc996 100644 (file)
@@ -13,7 +13,7 @@
 #include "string.h"
 #include "error.h"
 
-extern char *stat_item_values[NUM_STAT_ITEMS];
+extern const char *stat_item_values[NUM_STAT_ITEMS];
 
 /** Data specific to the amplify filter. */
 struct private_amp_data {
index 993e54afa0356ef8ae99104c27f751bc27aecd4e..a08bea51581b65d782980352ff33f8dadd018f69 100644 (file)
--- a/filter.c
+++ b/filter.c
@@ -34,7 +34,7 @@ static struct lls_parse_result *lpr; /* command line options */
  * This is used by the amp filter which first tries to obtain the amplification
  * value from an element in this array.
  */
-char *stat_item_values[NUM_STAT_ITEMS] = {NULL};
+const char *stat_item_values[NUM_STAT_ITEMS] = {NULL};
 
 /** The task that reads from stdin. */
 static struct stdin_task stdin_task_struct;