summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-11-05 10:27:50 +0100
committerTobias Klauser <tklauser@distanz.ch>2015-11-05 10:27:50 +0100
commitced058002d01024a18e9d9e2dda2a9af5854e232 (patch)
treeb8126fdfb63d0b282e040391ae94b63e1f93a6e7
parentf15857041821ba75eb608726c2aae15b4177b1f1 (diff)
ifpps: Remove unnecessary memset before ethtool_drvinf()
ethtool_drvinf() already clears the struct ethtool_drvinfo, so there is no need to do it manually before calling it. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--ifpps.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/ifpps.c b/ifpps.c
index 7c1bfcd..7c67103 100644
--- a/ifpps.c
+++ b/ifpps.c
@@ -313,7 +313,6 @@ retry:
}
if (ret == -EINVAL && try == 0) {
- memset(&drvinf, 0, sizeof(drvinf));
if (ethtool_drvinf(ifname, &drvinf) < 0)
goto done;
@@ -711,7 +710,6 @@ static void screen_header(WINDOW *screen, const char *ifname, int *voff,
int link = ethtool_link(ifname);
unsigned int cpus = get_number_cpus();
- memset(&drvinf, 0, sizeof(drvinf));
ethtool_drvinf(ifname, &drvinf);
memset(buff, 0, sizeof(buff));