diff options
| author | jvoisin | 2020-07-04 17:58:13 +0200 |
|---|---|---|
| committer | jvoisin | 2020-07-04 17:58:13 +0200 |
| commit | 55087da4701ddfbf4728b3670d8e46c07b4df881 (patch) | |
| tree | 4b4fc4ab0352d38ac98ea7af588d758f2e308f2a | |
| parent | 08f21d8b878b6c1490e6d6bb3d44aa640a88e9ca (diff) | |
Run clang-format on the codebase
| -rw-r--r-- | src/sp_disabled_functions.c | 2 | ||||
| -rw-r--r-- | src/sp_network_utils.c | 3 | ||||
| -rw-r--r-- | src/sp_sloppy.c | 4 | ||||
| -rw-r--r-- | src/sp_unserialize.c | 1 | ||||
| -rw-r--r-- | src/sp_utils.c | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index a6fc194..c46ee58 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c | |||
| @@ -357,7 +357,7 @@ static void should_disable(zend_execute_data* execute_data, | |||
| 357 | #else | 357 | #else |
| 358 | execute_data->func->op_array.arg_info->is_variadic | 358 | execute_data->func->op_array.arg_info->is_variadic |
| 359 | #endif | 359 | #endif |
| 360 | ){ | 360 | ) { |
| 361 | sp_log_warn( | 361 | sp_log_warn( |
| 362 | "disable_function", | 362 | "disable_function", |
| 363 | "Snuffleupagus doesn't support variadic functions yet, sorry. " | 363 | "Snuffleupagus doesn't support variadic functions yet, sorry. " |
diff --git a/src/sp_network_utils.c b/src/sp_network_utils.c index 1811d98..dc92969 100644 --- a/src/sp_network_utils.c +++ b/src/sp_network_utils.c | |||
| @@ -17,7 +17,8 @@ static inline bool cidr4_match(const struct in_addr addr, | |||
| 17 | 17 | ||
| 18 | static inline bool cidr6_match(const struct in6_addr address, | 18 | static inline bool cidr6_match(const struct in6_addr address, |
| 19 | const struct in6_addr network, uint8_t bits) { | 19 | const struct in6_addr network, uint8_t bits) { |
| 20 | #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) | 20 | #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \ |
| 21 | defined(__APPLE__) | ||
| 21 | const uint32_t *a = address.__u6_addr.__u6_addr32; | 22 | const uint32_t *a = address.__u6_addr.__u6_addr32; |
| 22 | const uint32_t *n = network.__u6_addr.__u6_addr32; | 23 | const uint32_t *n = network.__u6_addr.__u6_addr32; |
| 23 | #else | 24 | #else |
diff --git a/src/sp_sloppy.c b/src/sp_sloppy.c index 88052bb..b4212ca 100644 --- a/src/sp_sloppy.c +++ b/src/sp_sloppy.c | |||
| @@ -3,8 +3,8 @@ | |||
| 3 | ZEND_API zend_op_array* (*orig_zend_compile_file)(zend_file_handle* file_handle, | 3 | ZEND_API zend_op_array* (*orig_zend_compile_file)(zend_file_handle* file_handle, |
| 4 | int type) = NULL; | 4 | int type) = NULL; |
| 5 | #if PHP_VERSION_ID >= 80000 | 5 | #if PHP_VERSION_ID >= 80000 |
| 6 | ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, | 6 | ZEND_API zend_op_array* (*orig_zend_compile_string)( |
| 7 | const char* filename) = NULL; | 7 | zval* source_string, const char* filename) = NULL; |
| 8 | #else | 8 | #else |
| 9 | ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, | 9 | ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, |
| 10 | char* filename) = NULL; | 10 | char* filename) = NULL; |
diff --git a/src/sp_unserialize.c b/src/sp_unserialize.c index f265ce6..29706c9 100644 --- a/src/sp_unserialize.c +++ b/src/sp_unserialize.c | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | 2 | ||
| 3 | |||
| 4 | PHP_FUNCTION(sp_serialize) { | 3 | PHP_FUNCTION(sp_serialize) { |
| 5 | zif_handler orig_handler; | 4 | zif_handler orig_handler; |
| 6 | 5 | ||
diff --git a/src/sp_utils.c b/src/sp_utils.c index 1bd37fe..2665c28 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c | |||
| @@ -37,8 +37,8 @@ void sp_log_msg(char const* feature, int type, const char* fmt, ...) { | |||
| 37 | const char* error_filename = zend_get_executed_filename(); | 37 | const char* error_filename = zend_get_executed_filename(); |
| 38 | int syslog_level = (type == SP_LOG_DROP) ? LOG_ERR : LOG_INFO; | 38 | int syslog_level = (type == SP_LOG_DROP) ? LOG_ERR : LOG_INFO; |
| 39 | int error_lineno = zend_get_executed_lineno(TSRMLS_C); | 39 | int error_lineno = zend_get_executed_lineno(TSRMLS_C); |
| 40 | syslog(syslog_level, "[snuffleupagus][%s][%s] %s in %s on line %d", client_ip, feature, msg, | 40 | syslog(syslog_level, "[snuffleupagus][%s][%s] %s in %s on line %d", |
| 41 | error_filename, error_lineno); | 41 | client_ip, feature, msg, error_filename, error_lineno); |
| 42 | closelog(); | 42 | closelog(); |
| 43 | if (type == SP_LOG_DROP) { | 43 | if (type == SP_LOG_DROP) { |
| 44 | zend_bailout(); | 44 | zend_bailout(); |
