summaryrefslogtreecommitdiff
path: root/src/sp_execute.c
diff options
context:
space:
mode:
authorjvoisin2018-01-10 16:05:05 +0100
committerjvoisin2018-01-10 16:05:05 +0100
commit773c9b94c6978ccd41c5a46f0d03448fd0c039a7 (patch)
tree3657b5535eeb2941ef4005456a6bb764196bac47 /src/sp_execute.c
parentad6b3e723fe26bf1a3a573aed776960916d35499 (diff)
Minor constification
Diffstat (limited to 'src/sp_execute.c')
-rw-r--r--src/sp_execute.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sp_execute.c b/src/sp_execute.c
index c1d68d7..e6df1b6 100644
--- a/src/sp_execute.c
+++ b/src/sp_execute.c
@@ -44,7 +44,7 @@ static void is_builtin_matching(const char *restrict const filename,
44 } 44 }
45} 45}
46 46
47static void is_in_eval_and_whitelisted(zend_execute_data *execute_data) { 47static void is_in_eval_and_whitelisted(const zend_execute_data *execute_data) {
48 if (EXPECTED(0 == SNUFFLEUPAGUS_G(in_eval))) { 48 if (EXPECTED(0 == SNUFFLEUPAGUS_G(in_eval))) {
49 return; 49 return;
50 } 50 }
@@ -65,6 +65,8 @@ static void is_in_eval_and_whitelisted(zend_execute_data *execute_data) {
65 65
66 if (EXPECTED(current_function)) { 66 if (EXPECTED(current_function)) {
67 const sp_list_node *it = SNUFFLEUPAGUS_G(config).config_eval->whitelist; 67 const sp_list_node *it = SNUFFLEUPAGUS_G(config).config_eval->whitelist;
68 /* yes, we could use a HashTable instead, but since the list is pretty
69 * small, it doesn't maka a difference in practise. */
68 while (it) { 70 while (it) {
69 if (0 == strcmp(current_function, (char *)(it->data))) { 71 if (0 == strcmp(current_function, (char *)(it->data))) {
70 /* We've got a match, the function is whiteslited. */ 72 /* We've got a match, the function is whiteslited. */
@@ -157,7 +159,7 @@ static int sp_stream_open(const char *filename, zend_file_handle *handle) {
157 if (true == SNUFFLEUPAGUS_G(config).config_readonly_exec->enable) { 159 if (true == SNUFFLEUPAGUS_G(config).config_readonly_exec->enable) {
158 terminate_if_writable(filename); 160 terminate_if_writable(filename);
159 } 161 }
160 sp_list_node *config = 162 const sp_list_node *config =
161 SNUFFLEUPAGUS_G(config).config_disabled_constructs->construct_include; 163 SNUFFLEUPAGUS_G(config).config_disabled_constructs->construct_include;
162 switch (data->opline->extended_value) { 164 switch (data->opline->extended_value) {
163 case ZEND_INCLUDE: 165 case ZEND_INCLUDE: