Fix Coverity warning with uninitialised field in structure being used.
Zero out all the other unused ones.
>>> CID 120413 (#1 of 1): Uninitialized scalar variable (UNINIT)
Fixes:
bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
if (ptr_data != NULL) {
stat = rte_ethtool_get_pauseparam(params->port, &info);
} else {
+ memset(&info, 0, sizeof(info));
if (strcasecmp("all", params->opt) == 0) {
info.tx_pause = 1;
info.rx_pause = 1;
info.tx_pause = 0;
info.rx_pause = 0;
}
+ /* Assume auto-negotiation wanted */
+ info.autoneg = 1;
stat = rte_ethtool_set_pauseparam(params->port, &info);
}
if (stat == 0) {