aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-06-13 02:04:55 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-06-13 02:24:02 +0200
commite38fa7df2e53c731d664f1851fa754ac35f0400c (patch)
tree9ca15b2be7ccbc477eacebfea21f4ad4d4d93196 /src
parentsignal: remove unused APIs (diff)
downloadcimple-e38fa7df2e53c731d664f1851fa754ac35f0400c.tar.gz
cimple-e38fa7df2e53c731d664f1851fa754ac35f0400c.zip
sanitize #include-s
Diffstat (limited to 'src')
-rw-r--r--src/client.c1
-rw-r--r--src/client_main.c2
-rw-r--r--src/command.c1
-rw-r--r--src/event_loop.h2
-rw-r--r--src/file.c1
-rw-r--r--src/msg.c2
-rw-r--r--src/server_main.c2
-rw-r--r--src/signal.c2
-rw-r--r--src/storage.c2
-rw-r--r--src/tcp_server.c1
-rw-r--r--src/worker_main.c2
11 files changed, 8 insertions, 10 deletions
diff --git a/src/client.c b/src/client.c
index d7c1b58..b783afe 100644
--- a/src/client.c
+++ b/src/client.c
@@ -9,7 +9,6 @@
#include "compiler.h"
#include "log.h"
#include "msg.h"
-#include "net.h"
#include <stdlib.h>
diff --git a/src/client_main.c b/src/client_main.c
index 287a5cb..1969952 100644
--- a/src/client_main.c
+++ b/src/client_main.c
@@ -10,7 +10,7 @@
#include "const.h"
#include <getopt.h>
-#include <stdlib.h>
+#include <unistd.h>
static struct settings default_settings(void)
{
diff --git a/src/command.c b/src/command.c
index f629fde..e3a7773 100644
--- a/src/command.c
+++ b/src/command.c
@@ -11,6 +11,7 @@
#include "log.h"
#include "msg.h"
+#include <poll.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/event_loop.h b/src/event_loop.h
index 5273cc6..0e13b48 100644
--- a/src/event_loop.h
+++ b/src/event_loop.h
@@ -8,8 +8,6 @@
#ifndef __EVENT_LOOP_H__
#define __EVENT_LOOP_H__
-#include <poll.h>
-
struct event_loop;
int event_loop_create(struct event_loop **);
diff --git a/src/file.c b/src/file.c
index f40f849..5c36b77 100644
--- a/src/file.c
+++ b/src/file.c
@@ -12,7 +12,6 @@
#include <ftw.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
diff --git a/src/msg.c b/src/msg.c
index 3975a0c..0de8a13 100644
--- a/src/msg.c
+++ b/src/msg.c
@@ -9,10 +9,8 @@
#include "log.h"
#include "net.h"
-#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
struct msg {
size_t argc;
diff --git a/src/server_main.c b/src/server_main.c
index be2639f..5a0531b 100644
--- a/src/server_main.c
+++ b/src/server_main.c
@@ -10,7 +10,7 @@
#include "server.h"
#include <getopt.h>
-#include <stddef.h>
+#include <unistd.h>
static struct settings default_settings(void)
{
diff --git a/src/signal.c b/src/signal.c
index d8f89bd..d155e06 100644
--- a/src/signal.c
+++ b/src/signal.c
@@ -11,10 +11,10 @@
#include "file.h"
#include "log.h"
+#include <poll.h>
#include <signal.h>
#include <stddef.h>
#include <sys/signalfd.h>
-#include <unistd.h>
static int stop_signals[] = {SIGINT, SIGTERM, SIGQUIT};
diff --git a/src/storage.c b/src/storage.c
index c60ddee..b7f74e5 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -9,6 +9,8 @@
#include "log.h"
#include "storage_sqlite.h"
+#include <stddef.h>
+
typedef void (*storage_settings_destroy_t)(const struct storage_settings *);
typedef int (*storage_create_t)(struct storage *, const struct storage_settings *);
typedef void (*storage_destroy_t)(struct storage *);
diff --git a/src/tcp_server.c b/src/tcp_server.c
index ba310a8..59790b8 100644
--- a/src/tcp_server.c
+++ b/src/tcp_server.c
@@ -12,6 +12,7 @@
#include "net.h"
#include "signal.h"
+#include <poll.h>
#include <pthread.h>
#include <signal.h>
#include <stdlib.h>
diff --git a/src/worker_main.c b/src/worker_main.c
index dcfee47..1bb3289 100644
--- a/src/worker_main.c
+++ b/src/worker_main.c
@@ -10,7 +10,7 @@
#include "worker.h"
#include <getopt.h>
-#include <stddef.h>
+#include <unistd.h>
static struct settings default_settings(void)
{