]> tinc-vpn.org Git - tinc/commitdiff
Remove unused '#include's.
authorKirill Isakov <is-kir@ya.ru>
Thu, 29 Jul 2021 17:02:09 +0000 (23:02 +0600)
committerKirill Isakov <is-kir@ya.ru>
Thu, 29 Jul 2021 17:56:39 +0000 (23:56 +0600)
36 files changed:
src/bsd/device.c
src/chacha-poly1305/chacha-poly1305.c
src/conf.c
src/connection.c
src/control.c
src/dropin.c
src/edge.c
src/event.c
src/fd_device.c
src/graph.c
src/info.c
src/linux/device.c
src/meta.c
src/multicast_device.c
src/net.c
src/net_packet.c
src/net_setup.c
src/net_socket.c
src/netutl.c
src/node.c
src/openssl/digest.c
src/openssl/rsagen.c
src/process.c
src/process.h
src/protocol.c
src/protocol_auth.c
src/protocol_edge.c
src/protocol_key.c
src/protocol_misc.c
src/protocol_subnet.c
src/raw_socket_device.c
src/route.c
src/sptps_keypair.c
src/subnet.c
src/subnet_parse.c
src/tincd.c

index 235f4ec68d7529369b5538e8f29867b1c632f1ef..efe17d1a2feae9d0fb719e6ca691a432a213b176 100644 (file)
 #include "../conf.h"
 #include "../device.h"
 #include "../logger.h"
-#include "../names.h"
-#include "../net.h"
 #include "../route.h"
-#include "../utils.h"
 #include "../xalloc.h"
 
 #ifdef ENABLE_TUNEMU
index a74c50242f646a28b9df663e9574d41af241f374..d13fec419369ee35ff881e4139bc82f873b097b4 100644 (file)
@@ -1,6 +1,4 @@
 #include "../system.h"
-
-#include "../cipher.h"
 #include "../xalloc.h"
 
 #include "chacha.h"
index cbf3bea0eca878e022083277cc9bed6ff388abe1..de632af36289a2a5da948bb0db5a312ab4a5b460 100644 (file)
@@ -32,7 +32,6 @@
 #include "names.h"
 #include "netutl.h"             /* for str2address */
 #include "protocol.h"
-#include "utils.h"              /* for cp */
 #include "xalloc.h"
 
 splay_tree_t *config_tree = NULL;
index 2f35124e20ccef6a604493aa39b0e59e17f8e1d4..5a7c43b860c4a14bc4bd11b75953eac301adcc30 100644 (file)
 #include "cipher.h"
 #include "conf.h"
 #include "control_common.h"
-#include "list.h"
 #include "logger.h"
 #include "net.h"
 #include "rsa.h"
-#include "subnet.h"
 #include "utils.h"
 #include "xalloc.h"
 
index fc713c8b95c4393807d54d3d168d2c3e86fb8e70..6e2a7f329102280c557009e0daf823ca86046034 100644 (file)
@@ -22,9 +22,7 @@
 #include "conf.h"
 #include "control.h"
 #include "control_common.h"
-#include "graph.h"
 #include "logger.h"
-#include "meta.h"
 #include "names.h"
 #include "net.h"
 #include "netutl.h"
index 0cde7a03b20a3b575bdd246edcb5b9bf20ae423f..2d08dc4675ce2bd1ea141b43a0af332f94558bcb 100644 (file)
@@ -20,8 +20,6 @@
 
 #include "system.h"
 
-#include "xalloc.h"
-
 #ifndef HAVE_DAEMON
 /*
   Replacement for the daemon() function.
index 86970ce60d00e70c82c681469f71dde22c7897b0..a19b9d3344575ab55d1c27dccc5d5f2e88e5907f 100644 (file)
@@ -26,7 +26,6 @@
 #include "logger.h"
 #include "netutl.h"
 #include "node.h"
-#include "utils.h"
 #include "xalloc.h"
 
 splay_tree_t *edge_weight_tree;
index 6603ebf0d66801c900d2ee56faf65be8e6c2d39b..a1801723cc5cb7de25e1c102258a0f80500983b9 100644 (file)
 */
 
 #include "system.h"
-
-#include "dropin.h"
 #include "event.h"
-#include "net.h"
 #include "utils.h"
-#include "xalloc.h"
 
 struct timeval now;
 
index 1325ee5a1f577c96d74f72dcc668d368e79e12f5..205b628b6736f7c9a4992c7c1c5a5fdd4b395e4f 100644 (file)
@@ -31,7 +31,6 @@
 #include "logger.h"
 #include "net.h"
 #include "route.h"
-#include "utils.h"
 
 struct unix_socket_addr {
        size_t size;
index a774eacc2ab86e62d9090826b4795daacad98ec3..4de9181cce5f6df78c69670d7d9f784312798630 100644 (file)
 #include "system.h"
 
 #include "connection.h"
-#include "device.h"
 #include "edge.h"
 #include "graph.h"
 #include "list.h"
 #include "logger.h"
-#include "names.h"
 #include "netutl.h"
 #include "node.h"
 #include "protocol.h"
 #include "script.h"
 #include "subnet.h"
-#include "utils.h"
 #include "xalloc.h"
-#include "graph.h"
 
 /* Implementation of Kruskal's algorithm.
    Running time: O(EN)
index 758c0d1f4515533684fdb78d4dcf4f040e793546..bae3125aaeb3c4ca10e7a2f5de9ea277c31e74aa 100644 (file)
 #include "system.h"
 
 #include "control_common.h"
-#include "list.h"
 #include "subnet.h"
 #include "tincctl.h"
 #include "info.h"
 #include "utils.h"
-#include "xalloc.h"
 
 void logger(int level, int priority, const char *format, ...) {
        (void)level;
index 94e223f7ad9027d4da404a69be3d27bd5a79aaa4..d782c764dd2edc603eb361ab71da30c02f8eab60 100644 (file)
 #include "../device.h"
 #include "../logger.h"
 #include "../names.h"
-#include "../net.h"
 #include "../route.h"
-#include "../utils.h"
 #include "../xalloc.h"
-#include "../device.h"
 
 typedef enum device_type_t {
        DEVICE_TYPE_TUN,
index 4282a4e6bd7a63d25b42b3cade4cb1d2eb37b433..084c6a7f2c12d21df53bab202a2df33e856cc459 100644 (file)
@@ -28,7 +28,6 @@
 #include "net.h"
 #include "protocol.h"
 #include "utils.h"
-#include "xalloc.h"
 
 #ifndef MIN
 static ssize_t MIN(ssize_t x, ssize_t y) {
index e9607f0da87b7223e73e531754115957efb6faa7..fbb9aeabb8c61563bff88a34879bf30e80908bf6 100644 (file)
@@ -26,7 +26,6 @@
 #include "logger.h"
 #include "netutl.h"
 #include "utils.h"
-#include "route.h"
 #include "xalloc.h"
 
 static const char *device_info = "multicast socket";
index de79b5e848d03f5762a411c2dc35d04c0f89fc55..33870f1e029732c5fb878e556d5c4cb37040a89d 100644 (file)
--- a/src/net.c
+++ b/src/net.c
 #include "conf_net.h"
 #include "conf.h"
 #include "connection.h"
-#include "device.h"
 #include "graph.h"
 #include "logger.h"
 #include "meta.h"
 #include "names.h"
 #include "net.h"
-#include "netutl.h"
 #include "protocol.h"
 #include "subnet.h"
 #include "utils.h"
-#include "xalloc.h"
 
 int contradicting_add_edge = 0;
 int contradicting_del_edge = 0;
index 417c74ece48d162a35eacfcf10a81b1d4cc6a07e..f9907ee7d73aafdd6b6272cfa7c16bdf15eaaa5d 100644 (file)
 #include "ethernet.h"
 #include "ipv4.h"
 #include "ipv6.h"
-#include "graph.h"
 #include "logger.h"
 #include "net.h"
 #include "netutl.h"
 #include "protocol.h"
 #include "route.h"
 #include "utils.h"
-#include "xalloc.h"
 
 #ifndef MAX
 #define MAX(a, b) ((a) > (b) ? (a) : (b))
index f253ccd23412268bbc7d9ac1184513a8cf4c4377..f3a4bcca10d2b6394257c4749c1a2a8a5d04b3fd 100644 (file)
@@ -38,7 +38,6 @@
 #include "process.h"
 #include "protocol.h"
 #include "route.h"
-#include "rsa.h"
 #include "script.h"
 #include "subnet.h"
 #include "utils.h"
index 91f0bbb71095846c7e4f812e812c6841f8b8fc23..24a9804ed239be9800801d4afd53afe0f5d22b5b 100644 (file)
 #include "address_cache.h"
 #include "conf.h"
 #include "connection.h"
-#include "control_common.h"
 #include "list.h"
 #include "logger.h"
-#include "meta.h"
 #include "names.h"
 #include "net.h"
 #include "netutl.h"
index 2916e9ae6a01a6abc30719010736b3856e224812..e2ee7719d73fabb14b50c3cdaa359366c9cea4b5 100644 (file)
@@ -23,7 +23,6 @@
 #include "net.h"
 #include "netutl.h"
 #include "logger.h"
-#include "utils.h"
 #include "xalloc.h"
 
 bool hostnames = false;
index 8f4b6eeeb018b3c1c718b9c3fc66dd22d00f4cc9..78c9a9fa7dbcf5740bdc480105fa3a3b044403e3 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "address_cache.h"
 #include "control_common.h"
-#include "hash.h"
 #include "logger.h"
 #include "net.h"
 #include "netutl.h"
index d51dcaa971842e47a62defcdfc7dae31e8da91c1..20e45b645680f9e02fbc9641c154bf6404d341c3 100644 (file)
@@ -18,7 +18,6 @@
 */
 
 #include "../system.h"
-#include "../utils.h"
 #include "../xalloc.h"
 
 #include <openssl/err.h>
index 5c42ac5dd7b039bedd865847705c8d0c217cd506..3dd34e23e1710f93db97009fa273e9a72ff0b1cf 100644 (file)
@@ -17,8 +17,6 @@
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#include "../system.h"
-
 #include <openssl/pem.h>
 #include <openssl/err.h>
 
@@ -27,7 +25,6 @@ typedef RSA rsa_t;
 
 #include "../logger.h"
 #include "../rsagen.h"
-#include "../xalloc.h"
 
 /* This function prettyprints the key generation process */
 
index b6d4e124660aa66ee2452459c3411a49c641aee3..f596eb6cf84a2fa6d785d42b70c4de5d01d08125 100644 (file)
 
 #include "system.h"
 
-#include "conf.h"
-#include "connection.h"
-#include "control.h"
-#include "device.h"
-#include "edge.h"
-#include "event.h"
 #include "logger.h"
 #include "names.h"
-#include "net.h"
-#include "node.h"
 #include "process.h"
-#include "subnet.h"
-#include "utils.h"
-#include "xalloc.h"
 #include "version.h"
 
+#ifdef HAVE_MINGW
+#include "utils.h"
+#endif
+
 /* If zero, don't detach from the terminal. */
 bool do_detach = true;
 bool sigalrm = false;
index 93ef5e9c91ee7f03c5675bcea0cb8d1f9c426a3f..26a9cab661649b04ebf5cd8519fc56c73ba2a6e5 100644 (file)
@@ -29,6 +29,8 @@ extern bool detach(void);
 extern bool kill_other(int);
 
 #ifdef HAVE_MINGW
+#include "event.h"
+
 extern io_t stop_io;
 extern bool init_service(void);
 #endif
index d8b8867376d13c91c933c814091b036e89aec927..3a0ae1d79554e292779059177d4cdc40545af162 100644 (file)
@@ -25,7 +25,6 @@
 #include "logger.h"
 #include "meta.h"
 #include "protocol.h"
-#include "utils.h"
 #include "xalloc.h"
 
 bool tunnelserver = false;
index fc39b64e0dc0d9b03a9147b56a774c8ba416abc3..a40c87f34b85ea96c273b7555de02439a622d94c 100644 (file)
@@ -26,7 +26,6 @@
 #include "control_common.h"
 #include "cipher.h"
 #include "crypto.h"
-#include "device.h"
 #include "digest.h"
 #include "ecdsa.h"
 #include "edge.h"
@@ -37,7 +36,6 @@
 #include "net.h"
 #include "netutl.h"
 #include "node.h"
-#include "prf.h"
 #include "protocol.h"
 #include "rsa.h"
 #include "script.h"
index d650c36fbd3a1d2e53ceb5b72aa7562c930d2243..daceb2e06c217d1087751325334200cf3bee28ce 100644 (file)
@@ -26,7 +26,6 @@
 #include "edge.h"
 #include "graph.h"
 #include "logger.h"
-#include "meta.h"
 #include "net.h"
 #include "netutl.h"
 #include "node.h"
index a9d719bb87f050ee297c4c2b31508e2265623e75..3036d124d629bd6e5ddca88351eaa06f6d559dfb 100644 (file)
 #include "net.h"
 #include "netutl.h"
 #include "node.h"
-#include "prf.h"
 #include "protocol.h"
 #include "route.h"
 #include "sptps.h"
 #include "utils.h"
-#include "xalloc.h"
 
 #ifndef DISABLE_LEGACY
 static bool mykeyused = false;
index 050e30a0e3908f7bdaafeb8869689a49bf783b16..27125da80b6399a8fe04149faee0197201f79182 100644 (file)
@@ -21,7 +21,6 @@
 #include "system.h"
 
 #include "address_cache.h"
-#include "conf.h"
 #include "connection.h"
 #include "logger.h"
 #include "meta.h"
@@ -29,7 +28,6 @@
 #include "netutl.h"
 #include "protocol.h"
 #include "utils.h"
-#include "xalloc.h"
 
 #ifndef MIN
 #define MIN(x, y) (((x)<(y))?(x):(y))
index 53afb8a4f20e61f2e7e787d103a25183952d63e3..af31d0641139491d32478c79ca60f37404139b82 100644 (file)
@@ -24,8 +24,6 @@
 #include "conf.h"
 #include "connection.h"
 #include "logger.h"
-#include "net.h"
-#include "netutl.h"
 #include "node.h"
 #include "protocol.h"
 #include "subnet.h"
index 02f6afaf95f372a7012b4e164aac33e5271d9520..30f8b3cc21c814f62ce7e8b7ee74544d69aef03d 100644 (file)
@@ -28,8 +28,6 @@
 #include "device.h"
 #include "net.h"
 #include "logger.h"
-#include "utils.h"
-#include "route.h"
 #include "xalloc.h"
 
 #if defined(PF_PACKET) && defined(ETH_P_ALL) && defined(AF_PACKET) && defined(SIOCGIFINDEX)
index 3fe6edb2f8680abf012e405f2f1dc2d19ac8e4dc..aa5634c0b133e09a40ded6804243701a2e78c7df 100644 (file)
@@ -31,7 +31,6 @@
 #include "protocol.h"
 #include "route.h"
 #include "subnet.h"
-#include "utils.h"
 
 rmode_t routing_mode = RMODE_ROUTER;
 fmode_t forwarding_mode = FMODE_INTERNAL;
index 51540aa5f9655b180aea35b258f6bd9d83e89ace..4dbd2ba1779f7f3d7c07f10e7ca0284b3f0d9f62 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "crypto.h"
 #include "ecdsagen.h"
-#include "utils.h"
 
 static char *program_name;
 
index 4fefda6ff8f47996c380eabf2165da7d72b1aa9f..13c4603018b74070fd7887fae502c2f8fb2da66c 100644 (file)
 
 #include "splay_tree.h"
 #include "control_common.h"
-#include "device.h"
 #include "hash.h"
 #include "logger.h"
-#include "names.h"
 #include "net.h"
 #include "netutl.h"
 #include "node.h"
 #include "script.h"
 #include "subnet.h"
-#include "utils.h"
 #include "xalloc.h"
 
 /* lists type of subnet */
index 3273b0b80b28e3aeda59ae6f1c4976fa08010032..9e65145800e0b1b4db5d8a19a1e924ceabe17e0a 100644 (file)
 
 #include "logger.h"
 #include "net.h"
-#include "netutl.h"
 #include "subnet.h"
-#include "utils.h"
-#include "xalloc.h"
 
 /* Changing this default will affect ADD_SUBNET messages - beware of inconsistencies between versions */
 static const int DEFAULT_WEIGHT = 10;
index d8ab0ac06e40c70ed8ce6ba791389a647b79e536..35a84be1230e9b74acbb4bd4f8d6ce99ec4622ca 100644 (file)
 #endif
 
 #include "conf.h"
-#include "control.h"
 #include "crypto.h"
-#include "device.h"
 #include "event.h"
 #include "logger.h"
 #include "names.h"
 #include "net.h"
-#include "netutl.h"
 #include "process.h"
 #include "protocol.h"
 #include "utils.h"