r1825 - in branches/1.1: . bin/varnishadm bin/varnishd

des at projects.linpro.no des at projects.linpro.no
Fri Aug 10 11:30:07 CEST 2007


Author: des
Date: 2007-08-10 11:30:07 +0200 (Fri, 10 Aug 2007)
New Revision: 1825

Modified:
   branches/1.1/
   branches/1.1/bin/varnishadm/varnishadm.c
   branches/1.1/bin/varnishd/storage_file.c
Log:
Merged revisions 1823 via svnmerge from 
file:///var/lib/svn/varnish/trunk/varnish-cache

........
  r1823 | des | 2007-08-10 09:13:02 +0200 (Fri, 10 Aug 2007) | 2 lines
  
  Avoid mixing statements and declarations (#147)
........



Property changes on: branches/1.1
___________________________________________________________________
Name: svnmerge-integrated
   - /trunk/varnish-cache:1-1722,1727-1729,1738,1743-1777,1779-1793,1795,1797-1798,1800-1808,1810-1815,1817,1819
   + /trunk/varnish-cache:1-1722,1727-1729,1738,1743-1777,1779-1793,1795,1797-1798,1800-1808,1810-1815,1817,1819,1823

Modified: branches/1.1/bin/varnishadm/varnishadm.c
===================================================================
--- branches/1.1/bin/varnishadm/varnishadm.c	2007-08-10 09:22:49 UTC (rev 1824)
+++ branches/1.1/bin/varnishadm/varnishadm.c	2007-08-10 09:30:07 UTC (rev 1825)
@@ -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: branches/1.1/bin/varnishd/storage_file.c
===================================================================
--- branches/1.1/bin/varnishd/storage_file.c	2007-08-10 09:22:49 UTC (rev 1824)
+++ branches/1.1/bin/varnishd/storage_file.c	2007-08-10 09:30:07 UTC (rev 1825)
@@ -116,7 +116,8 @@
 static void
 smf_calcsize(struct smf_sc *sc, const char *size, int newfile)
 {
-	uintmax_t l;
+	struct statfs fsst;
+	uintmax_t l, fssize;
 	unsigned bs;
 	char suff[2];
 	int i, explicit;
@@ -126,10 +127,7 @@
 	AN(sc);
 	AZ(fstat(sc->fd, &st));
 
-#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