summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2014-03-26 12:33:01 -0500
committerDan Williams <dcbw@redhat.com>2014-04-02 12:06:14 -0500
commit408ecd6b5fe9cb09f2177e8e0010a044ea4aa309 (patch)
treed3c9378f37b657662c92f250fedaa0327a761b64
parent42499b5b71674cbe9d877091f95c2f7ffc9fc0be (diff)
downloadNetworkManager-408ecd6b5fe9cb09f2177e8e0010a044ea4aa309.tar.gz
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.
-rw-r--r--cli/src/settings.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/src/settings.c b/cli/src/settings.c
index 69a990b27d..5032578cf7 100644
--- a/cli/src/settings.c
+++ b/cli/src/settings.c
@@ -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;
}