From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D51DEC282C0 for ; Thu, 24 Jan 2019 02:05:46 +0000 (UTC) Received: from krantz.zx2c4.com (krantz.zx2c4.com [192.95.5.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 703BC218A1 for ; Thu, 24 Jan 2019 02:05:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gPO/ihi9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 703BC218A1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=wireguard-bounces@lists.zx2c4.com Received: from krantz.zx2c4.com (localhost [IPv6:::1]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 829c52fd; Thu, 24 Jan 2019 02:00:25 +0000 (UTC) Received: from krantz.zx2c4.com (localhost [127.0.0.1]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 9e4a7d75 for ; Wed, 23 Jan 2019 05:02:13 +0000 (UTC) Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 4b5e8f0a for ; Wed, 23 Jan 2019 05:02:13 +0000 (UTC) Received: by mail-pg1-x543.google.com with SMTP id w6so497490pgl.6 for ; Tue, 22 Jan 2019 21:07:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Ai9o8UZsQAyEcYVqDugLABV72Cth8g2gYjYLuxTcuDk=; b=gPO/ihi98QIunUXvvtn7A11LV0BpnTX30qOn8WxxePGXpw7QIYt/j5ik3zImqJ6J6A HM2/9owY/YBBarqPGqOrg/YSBKSyAN/AujEV5BlRzAg5cEl698QIunm1bq3emV5w2iu7 HmCgFYDrLPFXI/o8wA33102JU1T8cIW9k9aQ32iUydAf/9R02Z5lW5gdMsbmDUlbFnKo vXJsAqQzU+8xQaxbFbukBvRPfWAmZRjfmU7hvA0nWzdOwObKKMTpoaHx6+MXy6/J4EA4 PAcjdexw1tHRWRu85hgvTkXy6wLVBE6/ZIgzsqn0mLhyskW286UuLiCEdP1T3la+zAhi nG9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Ai9o8UZsQAyEcYVqDugLABV72Cth8g2gYjYLuxTcuDk=; b=X59CTeKUPxvwUQtk5empJazXyMJeesRRZVvunFYguwuuASRwMLwIKY7RQ1iyFsaldB 47NZ2bPHFUL3f8NAILQtIhVy5hEVFfOE6bkcq88+RCP/GiJjx+YlEP+9PybNtgzoAXtX IuGIlQ8fBvVVzPET++x1953hyeksWEfQInM+R2tmbr/apcxC6uk87ZT4ntFGY+SbxmT/ pB4MmhjIMtBSecaTE/cbiRO+o7IRzMxSdP8Fy4FrhjzOgOSYIfMM+CKwesRx0TEszlS3 RWJ41wTnx8fui5X+jS+rU6dqC4y3sjhbRKkW/8ju16RVQ3afBS3RpZLTf/1erTVsbrs5 SYxg== X-Gm-Message-State: AJcUuke8dxhkXDSlJifa198w641l6VQEWo7PKdAFXCjJfgt75buFeSwt K2uQhykqqgOOA5jtHXvNywlYddJK X-Google-Smtp-Source: ALg8bN6T6wwUqUFqmS7jY+ffhmYC7kAiGkshWPqM/KQYdeM/IubKvkCQ422Ru3o1G2WlkRULEIU2pA== X-Received: by 2002:a63:4566:: with SMTP id u38mr762161pgk.4.1548220034278; Tue, 22 Jan 2019 21:07:14 -0800 (PST) Received: from localhost.localdomain ([133.91.253.129]) by smtp.gmail.com with ESMTPSA id k191sm26664809pgd.9.2019.01.22.21.07.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Jan 2019 21:07:13 -0800 (PST) From: donkeysnore To: wireguard@lists.zx2c4.com Subject: [PATCH] Cleanup include redundancy Date: Wed, 23 Jan 2019 14:04:25 +0900 Message-Id: <20190123050425.1130-1-donkeysnore@gmail.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Thu, 24 Jan 2019 03:00:24 +0100 Cc: donkeysnore X-BeenThere: wireguard@lists.zx2c4.com X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: wireguard-bounces@lists.zx2c4.com Sender: "WireGuard" Signed-off-by: donkeysnore --- src/allowedips.c | 1 - src/cookie.c | 6 ------ src/crypto/zinc/blake2s/blake2s.c | 3 --- src/crypto/zinc/chacha20/chacha20.c | 1 - src/crypto/zinc/poly1305/poly1305.c | 1 - src/device.c | 3 --- src/device.h | 3 --- src/hashtables.c | 2 -- src/main.c | 2 -- src/messages.h | 1 - src/netlink.c | 2 -- src/noise.c | 5 ----- src/noise.h | 3 --- src/peer.c | 5 ----- src/peer.h | 5 ----- src/queueing.h | 4 ---- src/receive.c | 7 ------- src/send.c | 4 ---- src/socket.c | 5 ----- src/timers.c | 2 -- src/tools/config.c | 3 --- src/tools/curve25519.c | 1 - src/tools/encoding.h | 1 - src/tools/genkey.c | 1 - src/tools/ipc.c | 10 ---------- src/tools/set.c | 1 - src/tools/setconf.c | 1 - src/tools/show.c | 8 -------- src/tools/showconf.c | 5 ----- 29 files changed, 96 deletions(-) diff --git a/src/allowedips.c b/src/allowedips.c index 30b66f4..ace5ac7 100644 --- a/src/allowedips.c +++ b/src/allowedips.c @@ -3,7 +3,6 @@ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. */ -#include "allowedips.h" #include "peer.h" struct allowedips_node { diff --git a/src/cookie.c b/src/cookie.c index 97ab28a..f4095dc 100644 --- a/src/cookie.c +++ b/src/cookie.c @@ -3,16 +3,10 @@ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. */ -#include "cookie.h" #include "peer.h" -#include "device.h" -#include "messages.h" #include "ratelimiter.h" #include "timers.h" -#include -#include - #include #include diff --git a/src/crypto/zinc/blake2s/blake2s.c b/src/crypto/zinc/blake2s/blake2s.c index b881db0..c0c88ee 100644 --- a/src/crypto/zinc/blake2s/blake2s.c +++ b/src/crypto/zinc/blake2s/blake2s.c @@ -12,12 +12,9 @@ #include #include "../selftest/run.h" -#include #include -#include #include #include -#include #include typedef union { diff --git a/src/crypto/zinc/chacha20/chacha20.c b/src/crypto/zinc/chacha20/chacha20.c index b4763c8..6859c83 100644 --- a/src/crypto/zinc/chacha20/chacha20.c +++ b/src/crypto/zinc/chacha20/chacha20.c @@ -10,7 +10,6 @@ #include #include "../selftest/run.h" -#include #include #include #include diff --git a/src/crypto/zinc/poly1305/poly1305.c b/src/crypto/zinc/poly1305/poly1305.c index 7d373b9..c476719 100644 --- a/src/crypto/zinc/poly1305/poly1305.c +++ b/src/crypto/zinc/poly1305/poly1305.c @@ -11,7 +11,6 @@ #include "../selftest/run.h" #include -#include #include #include #include diff --git a/src/device.c b/src/device.c index 98c05bc..e1f6bb0 100644 --- a/src/device.c +++ b/src/device.c @@ -6,15 +6,12 @@ #include "queueing.h" #include "socket.h" #include "timers.h" -#include "device.h" #include "ratelimiter.h" -#include "peer.h" #include "messages.h" #include #include #include -#include #include #include #include diff --git a/src/device.h b/src/device.h index b85638c..c53c463 100644 --- a/src/device.h +++ b/src/device.h @@ -8,13 +8,10 @@ #include "noise.h" #include "allowedips.h" -#include "hashtables.h" #include "cookie.h" -#include #include #include -#include #include #include diff --git a/src/hashtables.c b/src/hashtables.c index 18cac91..242f27d 100644 --- a/src/hashtables.c +++ b/src/hashtables.c @@ -3,9 +3,7 @@ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. */ -#include "hashtables.h" #include "peer.h" -#include "noise.h" static struct hlist_head *pubkey_bucket(struct pubkey_hashtable *table, const u8 pubkey[NOISE_PUBLIC_KEY_LEN]) diff --git a/src/main.c b/src/main.c index 4b5b58e..7aa3e97 100644 --- a/src/main.c +++ b/src/main.c @@ -4,8 +4,6 @@ */ #include "version.h" -#include "device.h" -#include "noise.h" #include "queueing.h" #include "ratelimiter.h" #include "netlink.h" diff --git a/src/messages.h b/src/messages.h index 3cfd1c5..c8d6d76 100644 --- a/src/messages.h +++ b/src/messages.h @@ -10,7 +10,6 @@ #include #include -#include #include #include diff --git a/src/netlink.c b/src/netlink.c index bdd3150..0bac1d0 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -4,11 +4,9 @@ */ #include "netlink.h" -#include "device.h" #include "peer.h" #include "socket.h" #include "queueing.h" -#include "messages.h" #include "uapi/wireguard.h" #include #include diff --git a/src/noise.c b/src/noise.c index e629307..1efddd8 100644 --- a/src/noise.c +++ b/src/noise.c @@ -3,12 +3,7 @@ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. */ -#include "noise.h" -#include "device.h" -#include "peer.h" -#include "messages.h" #include "queueing.h" -#include "hashtables.h" #include #include diff --git a/src/noise.h b/src/noise.h index 8e5cc0a..7ad0cfc 100644 --- a/src/noise.h +++ b/src/noise.h @@ -5,14 +5,11 @@ #ifndef _WG_NOISE_H #define _WG_NOISE_H -#include "messages.h" #include "hashtables.h" -#include #include #include #include -#include #include #include diff --git a/src/peer.c b/src/peer.c index 020a97b..778c4fc 100644 --- a/src/peer.c +++ b/src/peer.c @@ -3,14 +3,9 @@ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. */ -#include "peer.h" -#include "device.h" #include "queueing.h" #include "timers.h" -#include "hashtables.h" -#include "noise.h" -#include #include #include #include diff --git a/src/peer.h b/src/peer.h index f3cf255..996afe6 100644 --- a/src/peer.h +++ b/src/peer.h @@ -7,13 +7,8 @@ #define _WG_PEER_H #include "device.h" -#include "noise.h" -#include "cookie.h" -#include #include -#include -#include #include struct wg_device; diff --git a/src/queueing.h b/src/queueing.h index d2866aa..ae35660 100644 --- a/src/queueing.h +++ b/src/queueing.h @@ -7,10 +7,6 @@ #define _WG_QUEUEING_H #include "peer.h" -#include -#include -#include -#include struct wg_device; struct wg_peer; diff --git a/src/receive.c b/src/receive.c index 693ec57..a7db35e 100644 --- a/src/receive.c +++ b/src/receive.c @@ -4,17 +4,10 @@ */ #include "queueing.h" -#include "device.h" -#include "peer.h" #include "timers.h" -#include "messages.h" -#include "cookie.h" #include "socket.h" #include -#include -#include -#include #include /* Must be called with bh disabled. */ diff --git a/src/send.c b/src/send.c index b0df5c7..c928367 100644 --- a/src/send.c +++ b/src/send.c @@ -5,11 +5,7 @@ #include "queueing.h" #include "timers.h" -#include "device.h" -#include "peer.h" #include "socket.h" -#include "messages.h" -#include "cookie.h" #include #include diff --git a/src/socket.c b/src/socket.c index 652d798..d93df29 100644 --- a/src/socket.c +++ b/src/socket.c @@ -3,16 +3,11 @@ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. */ -#include "device.h" #include "peer.h" #include "socket.h" #include "queueing.h" -#include "messages.h" #include -#include -#include -#include #include #include #include diff --git a/src/timers.c b/src/timers.c index ee16c56..f2ad4f6 100644 --- a/src/timers.c +++ b/src/timers.c @@ -4,8 +4,6 @@ */ #include "timers.h" -#include "device.h" -#include "peer.h" #include "queueing.h" #include "socket.h" diff --git a/src/tools/config.c b/src/tools/config.c index 5d15356..360721b 100644 --- a/src/tools/config.c +++ b/src/tools/config.c @@ -8,15 +8,12 @@ #include #include #include -#include #include #include -#include #include #include #include "config.h" -#include "containers.h" #include "ipc.h" #include "encoding.h" diff --git a/src/tools/curve25519.c b/src/tools/curve25519.c index 7949933..609ff6e 100644 --- a/src/tools/curve25519.c +++ b/src/tools/curve25519.c @@ -5,7 +5,6 @@ #include "curve25519.h" -#include #include #ifndef __BYTE_ORDER__ diff --git a/src/tools/encoding.h b/src/tools/encoding.h index f977ee9..41a2fb2 100644 --- a/src/tools/encoding.h +++ b/src/tools/encoding.h @@ -7,7 +7,6 @@ #define ENCODING_H #include -#include #include "containers.h" #define WG_KEY_LEN_BASE64 ((((WG_KEY_LEN) + 2) / 3) * 4 + 1) diff --git a/src/tools/genkey.c b/src/tools/genkey.c index 65711e1..c3d2642 100644 --- a/src/tools/genkey.c +++ b/src/tools/genkey.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/src/tools/ipc.c b/src/tools/ipc.c index da31eff..e22a9a5 100644 --- a/src/tools/ipc.c +++ b/src/tools/ipc.c @@ -11,34 +11,24 @@ #include #include "mnlg.h" #endif -#include -#include -#include #include -#include #include #include -#include #include #include #include -#include #include #include #include #include -#include #include -#include #include #include #include #include "ipc.h" -#include "containers.h" #include "encoding.h" #include "curve25519.h" -#include "../uapi/wireguard.h" #define SOCK_PATH RUNSTATEDIR "/wireguard/" #define SOCK_SUFFIX ".sock" diff --git a/src/tools/set.c b/src/tools/set.c index 19f4b92..f50f368 100644 --- a/src/tools/set.c +++ b/src/tools/set.c @@ -4,7 +4,6 @@ */ #include -#include #include #include "containers.h" diff --git a/src/tools/setconf.c b/src/tools/setconf.c index 8211ebd..7a0295a 100644 --- a/src/tools/setconf.c +++ b/src/tools/setconf.c @@ -5,7 +5,6 @@ #include #include -#include #include #include "containers.h" diff --git a/src/tools/show.c b/src/tools/show.c index ba6f115..870860d 100644 --- a/src/tools/show.c +++ b/src/tools/show.c @@ -5,20 +5,12 @@ #include #include -#include -#include -#include -#include #include -#include -#include #include #include #include -#include #include -#include "containers.h" #include "ipc.h" #include "terminal.h" #include "encoding.h" diff --git a/src/tools/showconf.c b/src/tools/showconf.c index ad76b7f..a57985f 100644 --- a/src/tools/showconf.c +++ b/src/tools/showconf.c @@ -4,16 +4,11 @@ */ #include -#include -#include -#include #include #include #include -#include #include -#include "containers.h" #include "encoding.h" #include "ipc.h" #include "subcommands.h" -- 2.17.1 _______________________________________________ WireGuard mailing list WireGuard@lists.zx2c4.com https://lists.zx2c4.com/mailman/listinfo/wireguard