Code style

This commit is contained in:
2022-08-17 22:35:51 +02:00
parent 170337d4d5
commit 041e4d43a7
12 changed files with 11 additions and 1 deletions

View File

@ -20,7 +20,6 @@
#include "lib/compress.h"
#include <string.h>
#include <poll.h>
#include <errno.h>
#include <unistd.h>
#include <openssl/ssl.h>

View File

@ -19,6 +19,7 @@
#include <openssl/sha.h>
#include <malloc.h>
int cache_continue = 1;
magic_t magic;
cache_entry *cache;

View File

@ -10,6 +10,7 @@
#include <malloc.h>
#include <errno.h>
int compress_init(compress_ctx *ctx, int mode) {
ctx->gzip = NULL;
ctx->brotli = NULL;

View File

@ -15,6 +15,7 @@
#include <errno.h>
#include <stdlib.h>
t_config *config;
char geoip_dir[256], dns_server[256];

View File

@ -15,6 +15,7 @@
#include <errno.h>
#include <string.h>
char *fastcgi_add_param(char *buf, const char *key, const char *value) {
char *ptr = buf;
unsigned long key_len = strlen(key);

View File

@ -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:

View File

@ -11,6 +11,7 @@
#include <string.h>
void http_to_camel_case(char *str, int mode) {
if (mode == HTTP_PRESERVE)
return;

View File

@ -8,6 +8,7 @@
#include "../necronda.h"
#include "http.h"
const http_status http_statuses[] = {
{100, "Informational", "Continue"},
{101, "Informational", "Switching Protocols"},

View File

@ -17,6 +17,7 @@
#include <arpa/inet.h>
#include <sys/time.h>
sock rev_proxy;
char *rev_proxy_host = NULL;
struct timeval server_timeout = {.tv_sec = SERVER_TIMEOUT, .tv_usec = 0};

View File

@ -14,6 +14,7 @@
#include <unistd.h>
#include <poll.h>
int sock_enc_error(sock *s) {
return (int) s->enc ? SSL_get_error(s->ssl, (int) s->_last_ret) : 0;
}

View File

@ -11,6 +11,7 @@
#include <stdlib.h>
#include <string.h>
int path_is_directory(const char *path) {
struct stat statbuf;
return stat(path, &statbuf) == 0 && S_ISDIR(statbuf.st_mode) != 0;

View File

@ -11,6 +11,7 @@
#include <string.h>
#include <stdlib.h>
char *log_prefix;
char *format_duration(unsigned long micros, char *buf) {