summaryrefslogtreecommitdiff
path: root/src/sp_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp_utils.c')
-rw-r--r--src/sp_utils.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c
index 3436328..42f7871 100644
--- a/src/sp_utils.c
+++ b/src/sp_utils.c
@@ -1,6 +1,6 @@
1#include "php_snuffleupagus.h" 1#include "php_snuffleupagus.h"
2 2
3static const char* default_ipaddr = "0.0.0.0"; 3static char const* const default_ipaddr = "0.0.0.0";
4const char* get_ipaddr() { 4const char* get_ipaddr() {
5 const char* client_ip = getenv("REMOTE_ADDR"); 5 const char* client_ip = getenv("REMOTE_ADDR");
6 if (client_ip) { 6 if (client_ip) {
@@ -15,8 +15,8 @@ const char* get_ipaddr() {
15 return default_ipaddr; 15 return default_ipaddr;
16} 16}
17 17
18void sp_log_msgf(char const* restrict feature, int level, int type, 18void sp_log_msgf(char const* const restrict feature, int level, int type,
19 const char* restrict fmt, ...) { 19 char const* const restrict fmt, ...) {
20 char* msg; 20 char* msg;
21 va_list args; 21 va_list args;
22 22
@@ -63,7 +63,7 @@ void sp_log_msgf(char const* restrict feature, int level, int type,
63 } 63 }
64} 64}
65 65
66int compute_hash(const char* const restrict filename, 66int compute_hash(char const* const restrict filename,
67 char* restrict file_hash) { 67 char* restrict file_hash) {
68 unsigned char buf[1024] = {0}; 68 unsigned char buf[1024] = {0};
69 unsigned char digest[SHA256_SIZE] = {0}; 69 unsigned char digest[SHA256_SIZE] = {0};
@@ -90,7 +90,7 @@ int compute_hash(const char* const restrict filename,
90 return SUCCESS; 90 return SUCCESS;
91} 91}
92 92
93int sp_log_request(const zend_string* restrict folder, const zend_string* restrict text_repr) { 93int sp_log_request(zend_string const* const restrict folder, zend_string const* const restrict text_repr) {
94 FILE* file; 94 FILE* file;
95 char const* const current_filename = zend_get_executed_filename(TSRMLS_C); 95 char const* const current_filename = zend_get_executed_filename(TSRMLS_C);
96 const int current_line = zend_get_executed_lineno(TSRMLS_C); 96 const int current_line = zend_get_executed_lineno(TSRMLS_C);