mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 15:50:07 +01:00
cli: fix setting DCB application priority (rh #1080510)
Priority was originally a 'guint' but then got changed to 'gint' and apparently we forgot to fix one place up.
This commit is contained in:
parent
42499b5b71
commit
408ecd6b5f
1 changed files with 4 additions and 4 deletions
|
|
@ -4319,20 +4319,20 @@ nmc_property_dcb_set_flags (NMSetting *setting, const char *prop, const char *va
|
|||
static gboolean
|
||||
nmc_property_dcb_set_priority (NMSetting *setting, const char *prop, const char *val, GError **error)
|
||||
{
|
||||
unsigned long priority = 0;
|
||||
long int priority = 0;
|
||||
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||
|
||||
if (!nmc_string_to_uint (val, FALSE, 0, 7, &priority)) {
|
||||
if (!nmc_string_to_int (val, FALSE, -1, 7, &priority)) {
|
||||
g_set_error (error, 1, 0, _("'%s' is not a DCB app priority"), val);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Validate the number according to the property spec */
|
||||
if (!validate_uint (setting, prop, (guint) priority, error))
|
||||
if (!validate_int (setting, prop, (gint) priority, error))
|
||||
return FALSE;
|
||||
|
||||
g_object_set (setting, prop, (guint) priority, NULL);
|
||||
g_object_set (setting, prop, (gint) priority, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue