From b4da775cf4b56945265ef1cbdbfaf7271ecb9188 Mon Sep 17 00:00:00 2001 From: des Date: Fri, 10 Aug 2007 07:13:02 +0000 Subject: [PATCH] Avoid mixing statements and declarations (#147) git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1823 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishadm/varnishadm.c | 3 ++- varnish-cache/bin/varnishd/storage_file.c | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/varnish-cache/bin/varnishadm/varnishadm.c b/varnish-cache/bin/varnishadm/varnishadm.c index e4da1699..886d9421 100644 --- a/varnish-cache/bin/varnishadm/varnishadm.c +++ b/varnish-cache/bin/varnishadm/varnishadm.c @@ -51,6 +51,7 @@ telnet_mgt(const char* T_arg, int argc, char* argv[]) struct vss_addr **ta; char *addr, *port; int i, n; + int sock; long status, bytes; char *answer = NULL; char buf[13]; @@ -65,7 +66,7 @@ telnet_mgt(const char* T_arg, int argc, char* argv[]) exit(2); } - int sock = VSS_connect(ta[0]); + sock = VSS_connect(ta[0]); for (i = 0; i < n; ++i) { free(ta[i]); diff --git a/varnish-cache/bin/varnishd/storage_file.c b/varnish-cache/bin/varnishd/storage_file.c index dc1da9cb..9ade7be0 100644 --- a/varnish-cache/bin/varnishd/storage_file.c +++ b/varnish-cache/bin/varnishd/storage_file.c @@ -118,6 +118,7 @@ struct smf_sc { static void smf_calcsize(struct smf_sc *sc, const char *size, int newfile) { + struct statfs fsst; uintmax_t l, fssize; unsigned bs; char suff[2]; @@ -129,10 +130,7 @@ smf_calcsize(struct smf_sc *sc, const char *size, int newfile) AZ(fstat(sc->fd, &st)); xxxassert(S_ISREG(st.st_mode)); -#if defined(HAVE_SYS_MOUNT_H) || defined(HAVE_SYS_VFS_H) - struct statfs fsst; AZ(fstatfs(sc->fd, &fsst)); -#endif /* We use units of the larger of filesystem blocksize and pagesize */ bs = sc->pagesize; -- 2.39.5