[master] 4a1413b Remove unused #includes
Poul-Henning Kamp
phk at varnish-cache.org
Sat Oct 8 17:21:45 CEST 2011
commit 4a1413b3b0ac8f80565ba781e2926b8f93167ae2
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Sat Oct 8 15:21:27 2011 +0000
Remove unused #includes
diff --git a/bin/varnishd/cache_acceptor.c b/bin/varnishd/cache_acceptor.c
index c02e170..af5edec 100644
--- a/bin/varnishd/cache_acceptor.c
+++ b/bin/varnishd/cache_acceptor.c
@@ -30,11 +30,10 @@
#include "config.h"
-#include <errno.h>
+#include "cache.h"
#include "vcli.h"
#include "cli_priv.h"
-#include "cache.h"
static pthread_t VCA_thread;
static struct timeval tv_sndtimeo;
diff --git a/bin/varnishd/cache_ban.c b/bin/varnishd/cache_ban.c
index fe1efd0..09e68cc 100644
--- a/bin/varnishd/cache_ban.c
+++ b/bin/varnishd/cache_ban.c
@@ -62,19 +62,16 @@
#include "config.h"
-#include <sys/types.h>
-
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <stdint.h>
#include <pcre.h>
+#include "cache.h"
+
#include "vcli.h"
#include "vend.h"
#include "cli_priv.h"
-#include "cache.h"
#include "hash_slinger.h"
struct ban {
diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c
index 7e91137..0b7f8bf 100644
--- a/bin/varnishd/cache_center.c
+++ b/bin/varnishd/cache_center.c
@@ -62,16 +62,15 @@ DOT acceptor -> start [style=bold,color=green]
#include <math.h>
#include <poll.h>
#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
#ifndef HAVE_SRANDOMDEV
#include "compat/srandomdev.h"
#endif
+#include "cache.h"
+
#include "vcl.h"
#include "cli_priv.h"
-#include "cache.h"
#include "hash_slinger.h"
#include "stevedore.h"
#include "vsha256.h"
diff --git a/bin/varnishd/cache_cli.c b/bin/varnishd/cache_cli.c
index bfc1cbc..3635aec 100644
--- a/bin/varnishd/cache_cli.c
+++ b/bin/varnishd/cache_cli.c
@@ -36,14 +36,14 @@
#include "config.h"
-#include <stdio.h>
#include <stddef.h> // offsetof
+#include "cache.h"
+
#include "vcli.h"
#include "cli_priv.h"
#include "cli_common.h"
#include "cli_serve.h"
-#include "cache.h"
#include "hash_slinger.h" // objhead
pthread_t cli_thread;
diff --git a/bin/varnishd/cache_http.c b/bin/varnishd/cache_http.c
index bd0380b..3703b00 100644
--- a/bin/varnishd/cache_http.c
+++ b/bin/varnishd/cache_http.c
@@ -31,15 +31,14 @@
#include "config.h"
-#include <unistd.h>
#include <stdarg.h>
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#include "vct.h"
#include "cache.h"
+#include "vct.h"
+
#define HTTPH(a, b, c, d, e, f, g) char b[] = "*" a ":";
#include "tbl/http_headers.h"
#undef HTTPH
diff --git a/bin/varnishd/cache_httpconn.c b/bin/varnishd/cache_httpconn.c
index 3ba5d7f..d1ceb6e 100644
--- a/bin/varnishd/cache_httpconn.c
+++ b/bin/varnishd/cache_httpconn.c
@@ -31,14 +31,13 @@
#include "config.h"
-#include <stdio.h>
#include <stdlib.h>
-#include <ctype.h>
#include <string.h>
-#include <unistd.h>
#include "cache.h"
+#include "vct.h"
+
/*--------------------------------------------------------------------
* Check if we have a complete HTTP request or response yet
*
@@ -55,7 +54,7 @@ htc_header_complete(txt *t)
Tcheck(*t);
assert(*t->e == '\0');
/* Skip any leading white space */
- for (p = t->b ; isspace(*p); p++)
+ for (p = t->b ; vct_issp(*p); p++)
continue;
if (*p == '\0') {
t->e = t->b;
diff --git a/bin/varnishd/cache_pool.c b/bin/varnishd/cache_pool.c
index 1aaa2ac..c5183a4 100644
--- a/bin/varnishd/cache_pool.c
+++ b/bin/varnishd/cache_pool.c
@@ -42,17 +42,13 @@
#include "config.h"
-#include <sys/types.h>
-
#include <errno.h>
-#include <stdio.h>
#include <math.h>
#include <stdlib.h>
-#include <string.h>
#include "cache.h"
+
#include "cache_waiter.h"
-#include "stevedore.h"
#include "hash_slinger.h"
/*--------------------------------------------------------------------
diff --git a/bin/varnishd/cache_vrt.c b/bin/varnishd/cache_vrt.c
index 86cb10f..02d2a42 100644
--- a/bin/varnishd/cache_vrt.c
+++ b/bin/varnishd/cache_vrt.c
@@ -31,22 +31,19 @@
#include "config.h"
-#include <sys/types.h>
-#include <sys/socket.h>
-
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
-#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
+#include "cache.h"
+
#include "vrt.h"
#include "vrt_obj.h"
#include "vcl.h"
-#include "cache.h"
#include "hash_slinger.h"
#include "cache_backend.h"
diff --git a/bin/varnishd/cache_vrt_re.c b/bin/varnishd/cache_vrt_re.c
index ef2376f..d28510f 100644
--- a/bin/varnishd/cache_vrt_re.c
+++ b/bin/varnishd/cache_vrt_re.c
@@ -34,10 +34,10 @@
#include <ctype.h>
#include <stdlib.h>
+#include "cache.h"
+
#include "vrt.h"
#include "vre.h"
-#include "vcl.h"
-#include "cache.h"
void
VRT_re_init(void **rep, const char *re)
diff --git a/bin/varnishd/cache_vrt_vmod.c b/bin/varnishd/cache_vrt_vmod.c
index 557b01b..4eb3e84 100644
--- a/bin/varnishd/cache_vrt_vmod.c
+++ b/bin/varnishd/cache_vrt_vmod.c
@@ -31,13 +31,13 @@
#include "config.h"
-#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
+#include "cache.h"
+
#include "cli_priv.h"
#include "vrt.h"
-#include "cache.h"
/*--------------------------------------------------------------------
* Modules stuff
diff --git a/bin/varnishd/cache_waiter_poll.c b/bin/varnishd/cache_waiter_poll.c
index 4678255..df0439b 100644
--- a/bin/varnishd/cache_waiter_poll.c
+++ b/bin/varnishd/cache_waiter_poll.c
@@ -30,14 +30,11 @@
#include "config.h"
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
#include <stdlib.h>
-#include <unistd.h>
#include <poll.h>
#include "cache.h"
+
#include "cache_waiter.h"
#define NEEV 128
diff --git a/bin/varnishd/cache_wrk.c b/bin/varnishd/cache_wrk.c
index bb88664..7e80f04 100644
--- a/bin/varnishd/cache_wrk.c
+++ b/bin/varnishd/cache_wrk.c
@@ -31,11 +31,9 @@
#include "config.h"
-#include <stdio.h>
#include <math.h>
#include <stdlib.h>
-#include "vcl.h"
#include "cache.h"
#include "hash_slinger.h"
#include "vsha256.h"
diff --git a/bin/varnishd/mgt_child.c b/bin/varnishd/mgt_child.c
index 3d6fa28..ba2effe 100644
--- a/bin/varnishd/mgt_child.c
+++ b/bin/varnishd/mgt_child.c
@@ -39,7 +39,6 @@
#include <signal.h>
#include <syslog.h>
#include <errno.h>
-#include <poll.h>
#include <sys/types.h>
#include <sys/wait.h>
diff --git a/bin/varnishd/mgt_param.c b/bin/varnishd/mgt_param.c
index f247b71..7138369 100644
--- a/bin/varnishd/mgt_param.c
+++ b/bin/varnishd/mgt_param.c
@@ -29,9 +29,6 @@
#include "config.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-
#include <grp.h>
#include <limits.h>
#include <pwd.h>
diff --git a/bin/varnishd/rfc2616.c b/bin/varnishd/rfc2616.c
index 51d4c74..36936b6 100644
--- a/bin/varnishd/rfc2616.c
+++ b/bin/varnishd/rfc2616.c
@@ -29,13 +29,10 @@
#include "config.h"
-#include <stdio.h>
#include <stdlib.h>
-#include <limits.h>
#include <math.h>
#include "cache.h"
-#include "vrt.h"
/*--------------------------------------------------------------------
* TTL and Age calculation in Varnish
diff --git a/bin/varnishd/storage_file.c b/bin/varnishd/storage_file.c
index 7388878..c363f4e 100644
--- a/bin/varnishd/storage_file.c
+++ b/bin/varnishd/storage_file.c
@@ -31,16 +31,12 @@
#include "config.h"
-#include <sys/param.h>
#include <sys/mman.h>
-#include <sys/stat.h>
-
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
#include "cache.h"
+
#include "stevedore.h"
#ifndef MAP_NOCORE
diff --git a/bin/varnishd/storage_malloc.c b/bin/varnishd/storage_malloc.c
index f72cd48..500e74c 100644
--- a/bin/varnishd/storage_malloc.c
+++ b/bin/varnishd/storage_malloc.c
@@ -31,12 +31,11 @@
#include "config.h"
-#include <sys/types.h>
-
#include <stdio.h>
#include <stdlib.h>
#include "cache.h"
+
#include "stevedore.h"
struct sma_sc {
diff --git a/bin/varnishd/storage_synth.c b/bin/varnishd/storage_synth.c
index 1c16b44..0792dbd 100644
--- a/bin/varnishd/storage_synth.c
+++ b/bin/varnishd/storage_synth.c
@@ -30,14 +30,11 @@
#include "config.h"
-#include <sys/types.h>
-
-#include <stdio.h>
#include <stdlib.h>
#include "cache.h"
+
#include "stevedore.h"
-#include "hash_slinger.h"
static struct lock sms_mtx;
diff --git a/bin/varnishd/varnishd.c b/bin/varnishd/varnishd.c
index 8b35970..0219eb0 100644
--- a/bin/varnishd/varnishd.c
+++ b/bin/varnishd/varnishd.c
@@ -40,7 +40,6 @@
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
-#include <time.h>
#include <unistd.h>
#include <sys/utsname.h>
@@ -52,7 +51,6 @@
#include "vsha256.h"
#include "vcli.h"
-#include "cli_priv.h"
#include "cli_common.h"
#include "vin.h"
More information about the varnish-commit
mailing list