summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2022-05-03 00:36:36 +0200
committerjvoisin2022-05-03 00:36:36 +0200
commit71ac90cf806b9b69236d759f6fbda7076886a6f1 (patch)
tree1c3ea25c65bb585fb216f8568be28f5c96a72fe5
parentf120adf586bfede2b5f1ab2d57ce3a8aa5341e77 (diff)
Two more const
-rw-r--r--src/sp_disabled_functions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c
index 95e19ad..2e659da 100644
--- a/src/sp_disabled_functions.c
+++ b/src/sp_disabled_functions.c
@@ -16,7 +16,7 @@ char* get_complete_function_path(zend_execute_data const* const execute_data) {
16 if (!execute_data) { 16 if (!execute_data) {
17 return NULL; // LCOV_EXCL_LINE 17 return NULL; // LCOV_EXCL_LINE
18 } 18 }
19 zend_function *func = execute_data->func; 19 const zend_function *const func = execute_data->func;
20 if (!(func->common.function_name)) { 20 if (!(func->common.function_name)) {
21 return NULL; 21 return NULL;
22 } 22 }
@@ -25,7 +25,7 @@ char* get_complete_function_path(zend_execute_data const* const execute_data) {
25 char* complete_path_function = NULL; 25 char* complete_path_function = NULL;
26 26
27 if ((func->type == ZEND_USER_FUNCTION || func->type == ZEND_INTERNAL_FUNCTION) && func->common.scope) { 27 if ((func->type == ZEND_USER_FUNCTION || func->type == ZEND_INTERNAL_FUNCTION) && func->common.scope) {
28 char const* class_name = ZSTR_VAL(func->common.scope->name); 28 const char *const class_name = ZSTR_VAL(func->common.scope->name);
29 const size_t len = strlen(class_name) + 2 + strlen(function_name) + 1; 29 const size_t len = strlen(class_name) + 2 + strlen(function_name) + 1;
30 complete_path_function = emalloc(len); 30 complete_path_function = emalloc(len);
31 snprintf(complete_path_function, len, "%s::%s", class_name, function_name); 31 snprintf(complete_path_function, len, "%s::%s", class_name, function_name);