]> granicus.if.org Git - vnstat/commitdiff
fix also summary estimates after previous commit
authorTeemu Toivola <git@humdi.net>
Wed, 1 May 2019 21:09:14 +0000 (00:09 +0300)
committerTeemu Toivola <git@humdi.net>
Wed, 1 May 2019 21:09:14 +0000 (00:09 +0300)
src/dbshow.c

index f9e7328abf963439cd7e0905220dd3ff7721abcf..df1cc120d9bdade26f7a374346e45434d244297c 100644 (file)
@@ -73,8 +73,6 @@ void showsummary(const interfaceinfo *interface, const int shortmode)
        current = time(NULL);
        yesterday = current - 86400;
 
-       e_rx = e_tx = 0;
-
        if (interface->updated && !shortmode) {
                strftime(datebuff, DATEBUFFLEN, DATETIMEFORMAT, localtime(&interface->updated));
                printf("Database updated: %s\n\n", datebuff);
@@ -132,6 +130,7 @@ void showsummary(const interfaceinfo *interface, const int shortmode)
                return;
        }
 
+       e_rx = e_tx = 0;
        datalist_i = datalist;
 
        while (datalist_i != NULL) {
@@ -212,6 +211,7 @@ void showsummary(const interfaceinfo *interface, const int shortmode)
                return;
        }
 
+       e_rx = e_tx = 0;
        datalist_i = datalist;
 
        while (datalist_i != NULL) {