diff options
| author | jvoisin | 2022-05-03 00:34:26 +0200 |
|---|---|---|
| committer | jvoisin | 2022-05-03 00:34:26 +0200 |
| commit | f120adf586bfede2b5f1ab2d57ce3a8aa5341e77 (patch) | |
| tree | 438b225502ef67a25b25d8bedce0f7e92d4d1990 /src | |
| parent | 04633d1384edf4fc80be626c29e5f848b17a78bf (diff) | |
Even more const
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp_config_utils.c | 6 | ||||
| -rw-r--r-- | src/sp_config_utils.h | 2 |
2 files changed, 4 insertions, 4 deletions
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 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | sp_list_node *parse_functions_list(char *value) { | 4 | sp_list_node *parse_functions_list(const char *const value) { |
| 5 | static const char *sep = ">"; | 5 | static const char *const sep = ">"; |
| 6 | 6 | ||
| 7 | if (NULL == strchr(value, sep[0])) { | 7 | if (NULL == strchr(value, sep[0])) { |
| 8 | return NULL; | 8 | return NULL; |
| @@ -10,7 +10,7 @@ sp_list_node *parse_functions_list(char *value) { | |||
| 10 | 10 | ||
| 11 | sp_list_node *list = NULL; | 11 | sp_list_node *list = NULL; |
| 12 | char *tmp = strdup(value); | 12 | char *tmp = strdup(value); |
| 13 | char *function_name; | 13 | const char *function_name; |
| 14 | char *next_token = tmp; | 14 | char *next_token = tmp; |
| 15 | while ((function_name = strtok_r(NULL, sep, &next_token))) { | 15 | while ((function_name = strtok_r(NULL, sep, &next_token))) { |
| 16 | list = sp_list_prepend(list, strdup(function_name)); | 16 | 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 @@ | |||
| 1 | #ifndef SP_CONFIG_UTILS | 1 | #ifndef SP_CONFIG_UTILS |
| 2 | #define SP_CONFIG_UTILS | 2 | #define SP_CONFIG_UTILS |
| 3 | 3 | ||
| 4 | sp_list_node *parse_functions_list(char *value); | 4 | sp_list_node *parse_functions_list(const char *const value); |
| 5 | 5 | ||
| 6 | #endif /* SP_CONFIG_UTILS */ | 6 | #endif /* SP_CONFIG_UTILS */ |
