r331 - trunk/varnish-cache/bin/varnishstat
phk at projects.linpro.no
phk at projects.linpro.no
Wed Jul 5 15:54:41 CEST 2006
Author: phk
Date: 2006-07-05 15:54:41 +0200 (Wed, 05 Jul 2006)
New Revision: 331
Modified:
trunk/varnish-cache/bin/varnishstat/varnishstat.c
Log:
Calculate rate as signed.
Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c
===================================================================
--- trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-07-05 13:44:20 UTC (rev 330)
+++ trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-07-05 13:54:41 UTC (rev 331)
@@ -22,7 +22,7 @@
struct shmloghead *lh;
struct varnish_stats *VSL_stats, copy;
int c_flag = 0;
- uintmax_t ju;
+ intmax_t ju;
struct timespec ts;
double tt, lt;
@@ -53,7 +53,7 @@
lt = tt - lt;
#define MAC_STAT(n,t,f,d) \
ju = VSL_stats->n; \
- printw("%12ju %10.2f " d "\n", ju, (ju - copy.n)/lt); \
+ printw("%12ju %10.2f " d "\n", ju, (ju - (intmax_t)copy.n)/lt); \
copy.n = ju;
#include "stat_field.h"
#undef MAC_STAT
More information about the varnish-commit
mailing list