From 643caf202af98fa5ebe83f642db459a04067e92f Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 7 Mar 2011 01:41:06 +0100 Subject: [PATCH] src/*: Cleanup includes. --- src/connection.c | 9 ++------- src/sem.c | 4 ++-- src/tlsproxy.c | 11 +++-------- src/tlsproxy.h | 7 +++++++ 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/connection.c b/src/connection.c index 65714c7..4160c7f 100644 --- a/src/connection.c +++ b/src/connection.c @@ -17,11 +17,9 @@ * along with this program. If not, see . */ -#include +#include "tlsproxy.h" +#include "connection.h" -#include -#include -#include /* close() */ #include /* getaddrinfo() */ @@ -29,9 +27,6 @@ /* poll() */ #include -#include "connection.h" -#include "tlsproxy.h" - /* Maximum line of the request line. Longer request lines are aborted with an * error. The standard doesn't specify a maximum line length but this should diff --git a/src/sem.c b/src/sem.c index 86fe398..0122390 100644 --- a/src/sem.c +++ b/src/sem.c @@ -17,11 +17,11 @@ * along with this program. If not, see . */ +#include "sem.h" + #include #include -#include "sem.h" - struct SEM { pthread_mutex_t mutex; diff --git a/src/tlsproxy.c b/src/tlsproxy.c index ab9c6df..70cf49d 100644 --- a/src/tlsproxy.c +++ b/src/tlsproxy.c @@ -17,11 +17,10 @@ * along with this program. If not, see . */ -#include +#include "tlsproxy.h" +#include "sem.h" +#include "connection.h" -#include -#include -#include /* socket(), bind(), accept(), listen() */ #include #include @@ -36,10 +35,6 @@ /* pthread_*() */ #include -#include "tlsproxy.h" -#include "sem.h" -#include "connection.h" - /* Size of ringbuffer. */ #define RINGBUFFER_SIZE 10 diff --git a/src/tlsproxy.h b/src/tlsproxy.h index 513964c..a0db68f 100644 --- a/src/tlsproxy.h +++ b/src/tlsproxy.h @@ -20,6 +20,13 @@ #ifndef TLSPROXY_H #define TLSPROXY_H +#include + +#include +#include +#include + + /* Proxy hostname and port if specified on the command line. */ char *use_proxy_host; char *use_proxy_port; -- 2.45.2