]> granicus.if.org Git - vnstat/commitdiff
remove redundant function parameter
authorTeemu Toivola <git@humdi.net>
Sun, 15 Sep 2019 15:31:29 +0000 (18:31 +0300)
committerTeemu Toivola <git@humdi.net>
Sun, 15 Sep 2019 15:31:29 +0000 (18:31 +0300)
src/vnstat_func.c
src/vnstat_func.h

index 46ede5c7ab782ca3f6a030343409945e4ef5ee2f..9cc244dfbfa7d5d18ebe0375035a37724bbd8f6b 100644 (file)
@@ -669,7 +669,7 @@ void handleshowdata(PARAMS *p)
 
        /* show only specified file */
        if (!p->defaultiface) {
-               showoneinterface(p, p->interface);
+               showoneinterface(p);
                return;
        }
 
@@ -718,13 +718,13 @@ void handleshowdata(PARAMS *p)
                        jsonfooter();
                }
 
-               /* show in qmode if there's only one file or qmode!=0 */
+               /* show in qmode if there's only one interface or qmode!=0 */
        } else {
-               showoneinterface(p, p->interface);
+               showoneinterface(p);
        }
 }
 
-void showoneinterface(PARAMS *p, const char *interface)
+void showoneinterface(PARAMS *p)
 {
        if (!db_getinterfacecountbyname(p->interface)) {
                if (strchr(p->interface, '+') == NULL) {
@@ -743,7 +743,7 @@ void showoneinterface(PARAMS *p, const char *interface)
                }
        }
        if (cfg.qmode != 8 && cfg.qmode != 10) {
-               showdb(interface, cfg.qmode, p->databegin, p->dataend);
+               showdb(p->interface, cfg.qmode, p->databegin, p->dataend);
        } else if (cfg.qmode == 8) {
                xmlheader();
                showxml(p->interface, p->xmlmode, p->databegin, p->dataend);
index 54c1c12216c3447d702908ab12f31bc288578018..d0bd8bca5d7d421c7858001cc12ed7709af3c66e 100644 (file)
@@ -20,7 +20,7 @@ void handlerenameinterface(PARAMS *p);
 void handleaddinterface(PARAMS *p);
 void handlesetalias(PARAMS *p);
 void handleshowdata(PARAMS *p);
-void showoneinterface(PARAMS *p, const char *interface);
+void showoneinterface(PARAMS *p);
 void handletrafficmeters(PARAMS *p);
 void handleifselection(PARAMS *p);