From: Teemu Toivola Date: Sun, 15 Sep 2019 15:31:29 +0000 (+0300) Subject: remove redundant function parameter X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1bb8c4892920956ca108f7402d510f2e43f1fb2b;p=vnstat remove redundant function parameter --- diff --git a/src/vnstat_func.c b/src/vnstat_func.c index 46ede5c..9cc244d 100644 --- a/src/vnstat_func.c +++ b/src/vnstat_func.c @@ -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); diff --git a/src/vnstat_func.h b/src/vnstat_func.h index 54c1c12..d0bd8bc 100644 --- a/src/vnstat_func.h +++ b/src/vnstat_func.h @@ -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);