diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-02-20 10:14:15 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-02-20 10:14:15 -0500 |
commit | 4438ef3288256e1f1ba706c157206a2ac190781d (patch) | |
tree | 3515fdc2c6f7b258c9fa81bb191e6bff90ecb66d /src/common | |
parent | a4ab273a0dafdd85e8e9f204c6e3e092282d3620 (diff) | |
download | tor-4438ef3288256e1f1ba706c157206a2ac190781d.tar.gz tor-4438ef3288256e1f1ba706c157206a2ac190781d.zip |
Remove a bunch of other redundant #includes
Folks have found two in the past week or so; we may as well fix the
others.
Found with:
\#!/usr/bin/python3
import re
def findMulti(fname):
includes = set()
with open(fname) as f:
for line in f:
m = re.match(r'^\s*#\s*include\s+["<](\S+)[>"]', line)
if m:
inc = m.group(1)
if inc in includes:
print("{}: {}".format(fname, inc))
includes.add(m.group(1))
import sys
for fname in sys.argv[1:]:
findMulti(fname)
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/buffers.h | 1 | ||||
-rw-r--r-- | src/common/compat.c | 1 | ||||
-rw-r--r-- | src/common/compat_winthreads.c | 1 |
3 files changed, 0 insertions, 3 deletions
diff --git a/src/common/buffers.h b/src/common/buffers.h index 22a5f7bfa3..4275152de2 100644 --- a/src/common/buffers.h +++ b/src/common/buffers.h @@ -13,7 +13,6 @@ #define TOR_BUFFERS_H #include "compat.h" -#include "compat.h" #include "torint.h" #include "testsupport.h" diff --git a/src/common/compat.c b/src/common/compat.c index 831813c1cc..e8916c8d1f 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -100,7 +100,6 @@ SecureZeroMemory(PVOID ptr, SIZE_T cnt) /* Only use the linux prctl; the IRIX prctl is totally different */ #include <sys/prctl.h> #elif defined(__APPLE__) -#include <sys/types.h> #include <sys/ptrace.h> #endif /* defined(HAVE_SYS_PRCTL_H) && defined(__linux__) || ... */ diff --git a/src/common/compat_winthreads.c b/src/common/compat_winthreads.c index 5f7ec94c23..7021344f6e 100644 --- a/src/common/compat_winthreads.c +++ b/src/common/compat_winthreads.c @@ -18,7 +18,6 @@ #include "util.h" #include "container.h" #include "torlog.h" -#include <process.h> /* This value is more or less total cargo-cult */ #define SPIN_COUNT 2000 |