r3071 - trunk/varnish-cache/bin/varnishstat

phk at projects.linpro.no phk at projects.linpro.no
Thu Aug 7 11:56:42 CEST 2008


Author: phk
Date: 2008-08-07 11:56:42 +0200 (Thu, 07 Aug 2008)
New Revision: 3071

Modified:
   trunk/varnish-cache/bin/varnishstat/varnishstat.c
Log:
Fix a printf type complaint.

Also fix style.



Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c
===================================================================
--- trunk/varnish-cache/bin/varnishstat/varnishstat.c	2008-08-07 09:42:24 UTC (rev 3070)
+++ trunk/varnish-cache/bin/varnishstat/varnishstat.c	2008-08-07 09:56:42 UTC (rev 3071)
@@ -212,10 +212,11 @@
 	up = tv.tv_sec - VSL_stats->start_time;
 
 	do {
-	  if (fields != NULL && ! show_field("uptime", fields ))
-	    break;
-	  printf("%-16s %12ju %12s %s\n", "uptime",
-		 tv.tv_sec - VSL_stats->start_time, ".  ", "Child uptime");
+		if (fields != NULL && ! show_field("uptime", fields ))
+			break;
+		printf("%-16s %12ju %12s %s\n", "uptime",
+		    (uintmax_t)(tv.tv_sec - VSL_stats->start_time),
+		    ".  ", "Child uptime");
 	} while (0);
 
 #define MAC_STAT(n, t, f, d) \




More information about the varnish-commit mailing list