mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 19:20:12 +01:00
cli: minor cleanup parsing dcb priorities
This commit is contained in:
parent
d8043664eb
commit
67b64ce868
1 changed files with 7 additions and 9 deletions
|
|
@ -2873,15 +2873,13 @@ static gboolean
|
|||
dcb_parse_uint_array (const char *val,
|
||||
guint max,
|
||||
guint other,
|
||||
guint *out_array,
|
||||
guint out_array[static 8],
|
||||
GError **error)
|
||||
{
|
||||
gs_strfreev char **items = NULL;
|
||||
char **iter;
|
||||
gsize i;
|
||||
|
||||
nm_assert (out_array);
|
||||
|
||||
items = g_strsplit_set (val, ",", -1);
|
||||
if (g_strv_length (items) != 8) {
|
||||
g_set_error_literal (error, 1, 0, _("must contain 8 comma-separated numbers"));
|
||||
|
|
@ -2933,7 +2931,7 @@ static gboolean
|
|||
_set_fcn_dcb_priority_flow_control (ARGS_SET_FCN)
|
||||
{
|
||||
guint i = 0;
|
||||
guint nums[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
guint nums[8] = { 0, };
|
||||
|
||||
nm_assert (!error || !*error);
|
||||
|
||||
|
|
@ -2951,7 +2949,7 @@ static gboolean
|
|||
_set_fcn_dcb_priority_group_id (ARGS_SET_FCN)
|
||||
{
|
||||
guint i = 0;
|
||||
guint nums[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
guint nums[8] = { 0, };
|
||||
|
||||
nm_assert (!error || !*error);
|
||||
|
||||
|
|
@ -2969,7 +2967,7 @@ static gboolean
|
|||
_set_fcn_dcb_priority_group_bandwidth (ARGS_SET_FCN)
|
||||
{
|
||||
guint i = 0, sum = 0;
|
||||
guint nums[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
guint nums[8] = { 0, };
|
||||
|
||||
nm_assert (!error || !*error);
|
||||
|
||||
|
|
@ -2994,7 +2992,7 @@ static gboolean
|
|||
_set_fcn_dcb_priority_bandwidth (ARGS_SET_FCN)
|
||||
{
|
||||
guint i = 0;
|
||||
guint nums[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
guint nums[8] = { 0, };
|
||||
|
||||
nm_assert (!error || !*error);
|
||||
|
||||
|
|
@ -3012,7 +3010,7 @@ static gboolean
|
|||
_set_fcn_dcb_priority_strict (ARGS_SET_FCN)
|
||||
{
|
||||
guint i = 0;
|
||||
guint nums[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
guint nums[8] = { 0, };
|
||||
|
||||
nm_assert (!error || !*error);
|
||||
|
||||
|
|
@ -3030,7 +3028,7 @@ static gboolean
|
|||
_set_fcn_dcb_priority_traffic_class (ARGS_SET_FCN)
|
||||
{
|
||||
guint i = 0;
|
||||
guint nums[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
guint nums[8] = { 0, };
|
||||
|
||||
nm_assert (!error || !*error);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue