mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 14:10:36 +01:00
libnm: avoid printing NULL string at NMSettingBondPort.verify()
printf() is not guaranteed to properly handle NULL string, although glibc will print "(null)". Avoid that by not printing the currently set value. The error message is anyway already very long.
This commit is contained in:
parent
222c070412
commit
bf13ec2df2
1 changed files with 2 additions and 4 deletions
|
|
@ -89,11 +89,9 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("A connection with a '%s' setting must have the slave-type set to '%s'. "
|
||||
"Instead it is '%s'"),
|
||||
_("A connection with a '%s' setting must have the slave-type set to '%s'"),
|
||||
NM_SETTING_BOND_PORT_SETTING_NAME,
|
||||
NM_SETTING_BOND_SETTING_NAME,
|
||||
slave_type);
|
||||
NM_SETTING_BOND_SETTING_NAME);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue