From f120adf586bfede2b5f1ab2d57ce3a8aa5341e77 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Tue, 3 May 2022 00:34:26 +0200 Subject: Even more const --- src/sp_config_utils.c | 6 +++--- src/sp_config_utils.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/sp_config_utils.c b/src/sp_config_utils.c index e93ef31..84b1f30 100644 --- a/src/sp_config_utils.c +++ b/src/sp_config_utils.c @@ -1,8 +1,8 @@ #include "php_snuffleupagus.h" -sp_list_node *parse_functions_list(char *value) { - static const char *sep = ">"; +sp_list_node *parse_functions_list(const char *const value) { + static const char *const sep = ">"; if (NULL == strchr(value, sep[0])) { return NULL; @@ -10,7 +10,7 @@ sp_list_node *parse_functions_list(char *value) { sp_list_node *list = NULL; char *tmp = strdup(value); - char *function_name; + const char *function_name; char *next_token = tmp; while ((function_name = strtok_r(NULL, sep, &next_token))) { list = sp_list_prepend(list, strdup(function_name)); diff --git a/src/sp_config_utils.h b/src/sp_config_utils.h index 64817a0..a3a2c81 100644 --- a/src/sp_config_utils.h +++ b/src/sp_config_utils.h @@ -1,6 +1,6 @@ #ifndef SP_CONFIG_UTILS #define SP_CONFIG_UTILS -sp_list_node *parse_functions_list(char *value); +sp_list_node *parse_functions_list(const char *const value); #endif /* SP_CONFIG_UTILS */ -- cgit v1.3