r1823 - in trunk/varnish-cache/bin: varnishadm varnishd

des at projects.linpro.no des at projects.linpro.no
Fri Aug 10 09:13:04 CEST 2007


Author: des
Date: 2007-08-10 09:13:02 +0200 (Fri, 10 Aug 2007)
New Revision: 1823

Modified:
   trunk/varnish-cache/bin/varnishadm/varnishadm.c
   trunk/varnish-cache/bin/varnishd/storage_file.c
Log:
Avoid mixing statements and declarations (#147)


Modified: trunk/varnish-cache/bin/varnishadm/varnishadm.c
===================================================================
--- trunk/varnish-cache/bin/varnishadm/varnishadm.c	2007-08-09 17:11:35 UTC (rev 1822)
+++ trunk/varnish-cache/bin/varnishadm/varnishadm.c	2007-08-10 07:13:02 UTC (rev 1823)
@@ -51,6 +51,7 @@
 	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 @@
 		exit(2);
 	}
 	
-	int sock = VSS_connect(ta[0]);
+       sock = VSS_connect(ta[0]);
 	
 	for (i = 0; i < n; ++i) {
 		free(ta[i]);

Modified: trunk/varnish-cache/bin/varnishd/storage_file.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_file.c	2007-08-09 17:11:35 UTC (rev 1822)
+++ trunk/varnish-cache/bin/varnishd/storage_file.c	2007-08-10 07:13:02 UTC (rev 1823)
@@ -118,6 +118,7 @@
 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 @@
 	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;




More information about the varnish-commit mailing list