summaryrefslogtreecommitdiff
path: root/src/sp_utils.c
diff options
context:
space:
mode:
authorxXx-caillou-xXx2018-08-28 18:16:11 +0200
committerjvoisin2018-08-28 16:16:11 +0000
commita0300b15a3afffe02c737d263c3d6dd31ac307b7 (patch)
tree0f03abc2ae41653c61de2e34a93292b15a200046 /src/sp_utils.c
parent888242c30d822392953e1b5f4fc289a96e9da5e0 (diff)
Fix some compilation warnings
Diffstat (limited to 'src/sp_utils.c')
-rw-r--r--src/sp_utils.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c
index cb6b4a7..41d817e 100644
--- a/src/sp_utils.c
+++ b/src/sp_utils.c
@@ -9,8 +9,8 @@
9 9
10ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) 10ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus)
11 11
12static bool sp_zend_string_equals(const zend_string* s1, 12bool sp_zend_string_equals(const zend_string* s1,
13 const zend_string* s2) { 13 const zend_string* s2) {
14 // We can't use `zend_string_equals` here because it doesn't work on 14 // We can't use `zend_string_equals` here because it doesn't work on
15 // `const` zend_string. 15 // `const` zend_string.
16 return ZSTR_LEN(s1) == ZSTR_LEN(s2) && 16 return ZSTR_LEN(s1) == ZSTR_LEN(s2) &&
@@ -113,8 +113,9 @@ int sp_log_request(const zend_string* folder, const zend_string* text_repr,
113 HashTable* ht = Z_ARRVAL(PG(http_globals)[zones[i].key]); 113 HashTable* ht = Z_ARRVAL(PG(http_globals)[zones[i].key]);
114 fprintf(file, "%s:", zones[i].str); 114 fprintf(file, "%s:", zones[i].str);
115 ZEND_HASH_FOREACH_STR_KEY_VAL(ht, variable_key, variable_value) { 115 ZEND_HASH_FOREACH_STR_KEY_VAL(ht, variable_key, variable_value) {
116 smart_str a = {0}; 116 smart_str a;
117 117
118 memset(&a, 0, sizeof(a));
118 php_var_export_ex(variable_value, 1, &a); 119 php_var_export_ex(variable_value, 1, &a);
119 ZSTR_VAL(a.s)[ZSTR_LEN(a.s)] = '\0'; 120 ZSTR_VAL(a.s)[ZSTR_LEN(a.s)] = '\0';
120 fprintf(file, "%s=%s ", ZSTR_VAL(variable_key), ZSTR_VAL(a.s)); 121 fprintf(file, "%s=%s ", ZSTR_VAL(variable_key), ZSTR_VAL(a.s));