From e7d18548b9e15ff24b357fc182c1300901495466 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 8 Dec 2017 16:25:37 +0100 Subject: [PATCH] cli: fix integer types in get-functions to match libnm origin The num/i variables are initialized from libnm API and used back at them. The integer types should match. --- clients/common/nm-meta-setting-desc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c index 75508d7db9..5512b8047a 100644 --- a/clients/common/nm-meta-setting-desc.c +++ b/clients/common/nm-meta-setting-desc.c @@ -3121,14 +3121,14 @@ _get_fcn_ip_config_addresses (ARGS_GET_FCN) { NMSettingIPConfig *s_ip = NM_SETTING_IP_CONFIG (setting); GString *printable; - guint32 num_addresses, i; + guint num_addresses, i; NMIPAddress *addr; RETURN_UNSUPPORTED_GET_TYPE (); printable = g_string_new (NULL); - num_addresses = nm_setting_ip_config_get_num_addresses (s_ip); + num_addresses = NM_MIN ((guint) G_MAXINT, nm_setting_ip_config_get_num_addresses (s_ip)); for (i = 0; i < num_addresses; i++) { addr = nm_setting_ip_config_get_address (s_ip, i); @@ -3148,14 +3148,14 @@ _get_fcn_ip_config_routes (ARGS_GET_FCN) { NMSettingIPConfig *s_ip = NM_SETTING_IP_CONFIG (setting); GString *printable; - guint32 num_routes, i; + guint num_routes, i; NMIPRoute *route; RETURN_UNSUPPORTED_GET_TYPE (); printable = g_string_new (NULL); - num_routes = nm_setting_ip_config_get_num_routes (s_ip); + num_routes = NM_MIN ((guint) G_MAXINT, nm_setting_ip_config_get_num_routes (s_ip)); for (i = 0; i < num_routes; i++) { gs_free char *attr_str = NULL; gs_strfreev char **attr_names = NULL; @@ -3855,7 +3855,7 @@ _get_fcn_team_link_watchers (ARGS_GET_FCN) { NMSettingTeam *s_team = NM_SETTING_TEAM (setting); GString *printable; - guint32 num_watchers, i; + guint num_watchers, i; NMTeamLinkWatcher *watcher; char *watcher_str; @@ -3927,7 +3927,7 @@ _get_fcn_team_port_link_watchers (ARGS_GET_FCN) { NMSettingTeamPort *s_team_port = NM_SETTING_TEAM_PORT (setting); GString *printable; - guint32 num_watchers, i; + guint num_watchers, i; NMTeamLinkWatcher *watcher; char *watcher_str;