sbm

simple bandwidth monitor
git clone git://git.2f30.org/sbm
Log | Files | Refs | LICENSE

commit 71c5d0e7e7aaf460b8d56df47fe38528757b414d
parent be16eb47852b3919d796b75453ecba4c471cfea1
Author: sin <sin@2f30.org>
Date:   Mon, 22 Feb 2016 14:42:23 +0000

Group related assignments

Diffstat:
Msbm.c | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sbm.c b/sbm.c @@ -238,10 +238,8 @@ loop(char *ifname, long count, struct timeval *delay) diffrxpps = (rxpps - oldrxpps) * 1000 / tv2ms(&diff); difftxpps = (txpps - oldtxpps) * 1000 / tv2ms(&diff); print(ifname, diffrxbits, difftxbits, diffrxpps, difftxpps); - oldrxbytes = rxbytes; - oldtxbytes = txbytes; - oldrxpps = rxpps; - oldtxpps = txpps; + oldrxbytes = rxbytes, oldtxbytes = txbytes; + oldrxpps = rxpps, oldtxpps = txpps; if (count && ++n >= count) break; }