- memset (&drvinfo, 0, sizeof (drvinfo));
- drvinfo.cmd = ETHTOOL_GDRVINFO;
- req.ifr_data = (void *) &drvinfo;
+ struct ethtool_drvinfo drvinfo = {
+ .cmd = ETHTOOL_GDRVINFO
+ };
+
+ struct ifreq req = {
+ .ifr_data = (void *) &drvinfo
+ };
+
+ sstrncpy(req.ifr_name, device, sizeof (req.ifr_name));
+