netlink: work around spurious selftest failure

Using a global variable, guaranteed to be zero initialized, for parser
results in netlink/module-eeprom.c works fine for ethtool itself but it
results in a selftest (make check) failure because test-cmdline calls
nl_getmodule() multiple times and parsed values from previous calls
are not cleared.

Rather than clearing the structure manually before each parser run, make
getmodule_cmd_params a local variable of nl_getmodule() as it is not used
anywhere else and this way is more consistent with rest of the netlink
code.

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
1 file changed