mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 09:20:23 +01:00
libnm: fix warning when setting wrong ethtool ternary value
$ nmcli connection modify dummy1 ethtool.feature-rx a (process:3077356): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: 'a' is not valid; use 'on', 'off', or 'ignore' Error: failed to modify ethtool.feature-rx: 'a' is not valid; use [true, yes, on], [false, no, off] or [unknown]. Fixes:e5b46aa38a('cli: use nmc_string_to_ternary() to parse ternary in _set_fcn_ethtool()') (cherry picked from commit25e705c361)
This commit is contained in:
parent
8794f9ce50
commit
2aa19708c2
1 changed files with 1 additions and 1 deletions
|
|
@ -4317,7 +4317,7 @@ static gboolean _set_fcn_ethtool(ARGS_SET_FCN)
|
|||
if (!nmc_string_to_ternary_full(value,
|
||||
NMC_STRING_TO_TERNARY_FLAGS_IGNORE_FOR_DEFAULT,
|
||||
&t,
|
||||
error)) {
|
||||
NULL)) {
|
||||
g_set_error(error,
|
||||
NM_UTILS_ERROR,
|
||||
NM_UTILS_ERROR_INVALID_ARGUMENT,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue