]> err.no Git - varnish/commitdiff
Calculate rate as signed.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 5 Jul 2006 13:54:41 +0000 (13:54 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 5 Jul 2006 13:54:41 +0000 (13:54 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@331 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishstat/varnishstat.c

index d752667b07db596c3eb8341cf822ef749941cecd..8182d6a2715e216f3ed9428c2bdf2dcbb6a913c8 100644 (file)
@@ -22,7 +22,7 @@ main(int argc, char **argv)
        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 @@ main(int argc, char **argv)
                        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