From 041e4d43a7879fb26ded185d4721e5eacb297d7e Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Wed, 17 Aug 2022 22:35:51 +0200 Subject: [PATCH] Code style --- src/client.c | 1 - src/lib/cache.c | 1 + src/lib/compress.c | 1 + src/lib/config.c | 1 + src/lib/fastcgi.c | 1 + src/lib/geoip.c | 1 + src/lib/http.c | 1 + src/lib/http_static.c | 1 + src/lib/rev_proxy.c | 1 + src/lib/sock.c | 1 + src/lib/uri.c | 1 + src/lib/utils.c | 1 + 12 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/client.c b/src/client.c index 2cdd41d..b4ffa36 100644 --- a/src/client.c +++ b/src/client.c @@ -20,7 +20,6 @@ #include "lib/compress.h" #include -#include #include #include #include diff --git a/src/lib/cache.c b/src/lib/cache.c index 8fdfdfd..9fa74bc 100644 --- a/src/lib/cache.c +++ b/src/lib/cache.c @@ -19,6 +19,7 @@ #include #include + int cache_continue = 1; magic_t magic; cache_entry *cache; diff --git a/src/lib/compress.c b/src/lib/compress.c index 233fb22..7db2f63 100644 --- a/src/lib/compress.c +++ b/src/lib/compress.c @@ -10,6 +10,7 @@ #include #include + int compress_init(compress_ctx *ctx, int mode) { ctx->gzip = NULL; ctx->brotli = NULL; diff --git a/src/lib/config.c b/src/lib/config.c index 0ce885f..f2b2f45 100644 --- a/src/lib/config.c +++ b/src/lib/config.c @@ -15,6 +15,7 @@ #include #include + t_config *config; char geoip_dir[256], dns_server[256]; diff --git a/src/lib/fastcgi.c b/src/lib/fastcgi.c index a9a7707..f4a2b2f 100644 --- a/src/lib/fastcgi.c +++ b/src/lib/fastcgi.c @@ -15,6 +15,7 @@ #include #include + char *fastcgi_add_param(char *buf, const char *key, const char *value) { char *ptr = buf; unsigned long key_len = strlen(key); diff --git a/src/lib/geoip.c b/src/lib/geoip.c index 1a865c4..80cb0c3 100644 --- a/src/lib/geoip.c +++ b/src/lib/geoip.c @@ -7,6 +7,7 @@ #include "geoip.h" + MMDB_entry_data_list_s *mmdb_json(MMDB_entry_data_list_s *list, char *str, long *str_off, long str_len) { switch (list->entry_data.type) { case MMDB_DATA_TYPE_MAP: diff --git a/src/lib/http.c b/src/lib/http.c index 99dfe2b..4ccbc73 100644 --- a/src/lib/http.c +++ b/src/lib/http.c @@ -11,6 +11,7 @@ #include + void http_to_camel_case(char *str, int mode) { if (mode == HTTP_PRESERVE) return; diff --git a/src/lib/http_static.c b/src/lib/http_static.c index 0a08f52..537d5bd 100644 --- a/src/lib/http_static.c +++ b/src/lib/http_static.c @@ -8,6 +8,7 @@ #include "../necronda.h" #include "http.h" + const http_status http_statuses[] = { {100, "Informational", "Continue"}, {101, "Informational", "Switching Protocols"}, diff --git a/src/lib/rev_proxy.c b/src/lib/rev_proxy.c index 141d995..dd09b5a 100644 --- a/src/lib/rev_proxy.c +++ b/src/lib/rev_proxy.c @@ -17,6 +17,7 @@ #include #include + sock rev_proxy; char *rev_proxy_host = NULL; struct timeval server_timeout = {.tv_sec = SERVER_TIMEOUT, .tv_usec = 0}; diff --git a/src/lib/sock.c b/src/lib/sock.c index 46a5703..5c0cfd5 100644 --- a/src/lib/sock.c +++ b/src/lib/sock.c @@ -14,6 +14,7 @@ #include #include + int sock_enc_error(sock *s) { return (int) s->enc ? SSL_get_error(s->ssl, (int) s->_last_ret) : 0; } diff --git a/src/lib/uri.c b/src/lib/uri.c index 402be2d..1e5c10c 100644 --- a/src/lib/uri.c +++ b/src/lib/uri.c @@ -11,6 +11,7 @@ #include #include + int path_is_directory(const char *path) { struct stat statbuf; return stat(path, &statbuf) == 0 && S_ISDIR(statbuf.st_mode) != 0; diff --git a/src/lib/utils.c b/src/lib/utils.c index 2683d37..2661f0d 100644 --- a/src/lib/utils.c +++ b/src/lib/utils.c @@ -11,6 +11,7 @@ #include #include + char *log_prefix; char *format_duration(unsigned long micros, char *buf) {