From 3a6da57b165d31f8cdd561e175fdecc8e7479bed Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 8 Oct 2018 11:26:46 +0200 Subject: [PATCH] libnm-core: fix other int comparisons in team setting I forgot to update them when applying commit 72b454177121. Fixes: 72b45417712186b0247ba5a69e42d54a27763fb0 (cherry picked from commit 17a942b458d9467046dfc1ad8a3914aa2f9163a4) --- libnm-core/nm-setting-team.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libnm-core/nm-setting-team.c b/libnm-core/nm-setting-team.c index e311ba7776..3d15146266 100644 --- a/libnm-core/nm-setting-team.c +++ b/libnm-core/nm-setting-team.c @@ -127,7 +127,7 @@ nm_team_link_watcher_new_ethtool (int delay_up, if (delay_up < 0 || !_NM_INT_LE_MAXINT32 (delay_up)) val_fail = "delay-up"; - if (delay_down < 0 || !_NM_INT_LE_MAXINT32 (delay_up)) + if (delay_down < 0 || !_NM_INT_LE_MAXINT32 (delay_down)) val_fail = "delay-down"; if (val_fail) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_FAILED, @@ -182,11 +182,11 @@ nm_team_link_watcher_new_nsna_ping (int init_wait, return NULL; } - if (init_wait < 0 || init_wait > G_MAXINT32) + if (init_wait < 0 || !_NM_INT_LE_MAXINT32 (init_wait)) val_fail = "init-wait"; - if (interval < 0 || interval > G_MAXINT32) + if (interval < 0 || !_NM_INT_LE_MAXINT32 (interval)) val_fail = "interval"; - if (missed_max < 0 || missed_max > G_MAXINT32) + if (missed_max < 0 || !_NM_INT_LE_MAXINT32 (missed_max)) val_fail = "missed-max"; if (val_fail) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_FAILED, @@ -255,11 +255,11 @@ nm_team_link_watcher_new_arp_ping (int init_wait, return NULL; } - if (init_wait < 0 || init_wait > G_MAXINT32) + if (init_wait < 0 || !_NM_INT_LE_MAXINT32 (init_wait)) val_fail = "init-wait"; - if (interval < 0 || interval > G_MAXINT32) + if (interval < 0 || !_NM_INT_LE_MAXINT32 (interval)) val_fail = "interval"; - if (missed_max < 0 || missed_max > G_MAXINT32) + if (missed_max < 0 || !_NM_INT_LE_MAXINT32 (missed_max)) val_fail = "missed-max"; if (val_fail) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_FAILED,