From ced058002d01024a18e9d9e2dda2a9af5854e232 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 5 Nov 2015 10:27:50 +0100 Subject: 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 --- ifpps.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'ifpps.c') 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)); -- cgit v1.2.3-54-g00ecf