From 55087da4701ddfbf4728b3670d8e46c07b4df881 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 4 Jul 2020 17:58:13 +0200 Subject: Run clang-format on the codebase --- src/sp_disabled_functions.c | 2 +- src/sp_network_utils.c | 3 ++- src/sp_sloppy.c | 4 ++-- src/sp_unserialize.c | 1 - src/sp_utils.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') 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, #else execute_data->func->op_array.arg_info->is_variadic #endif - ){ + ) { sp_log_warn( "disable_function", "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, static inline bool cidr6_match(const struct in6_addr address, const struct in6_addr network, uint8_t bits) { -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \ + defined(__APPLE__) const uint32_t *a = address.__u6_addr.__u6_addr32; const uint32_t *n = network.__u6_addr.__u6_addr32; #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 @@ ZEND_API zend_op_array* (*orig_zend_compile_file)(zend_file_handle* file_handle, int type) = NULL; #if PHP_VERSION_ID >= 80000 -ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, - const char* filename) = NULL; +ZEND_API zend_op_array* (*orig_zend_compile_string)( + zval* source_string, const char* filename) = NULL; #else ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, 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 @@ #include "php_snuffleupagus.h" - PHP_FUNCTION(sp_serialize) { zif_handler orig_handler; 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, ...) { const char* error_filename = zend_get_executed_filename(); int syslog_level = (type == SP_LOG_DROP) ? LOG_ERR : LOG_INFO; int error_lineno = zend_get_executed_lineno(TSRMLS_C); - syslog(syslog_level, "[snuffleupagus][%s][%s] %s in %s on line %d", client_ip, feature, msg, - error_filename, error_lineno); + syslog(syslog_level, "[snuffleupagus][%s][%s] %s in %s on line %d", + client_ip, feature, msg, error_filename, error_lineno); closelog(); if (type == SP_LOG_DROP) { zend_bailout(); -- cgit v1.3