summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-12-08 16:25:37 +0100
committerThomas Haller <thaller@redhat.com>2017-12-08 16:31:28 +0100
commite7d18548b9e15ff24b357fc182c1300901495466 (patch)
tree934534231115614b4a761bdb496bf650264e3ac9 /clients
parentae5af6b368141a5ff6fa758ed6e930e668237ca4 (diff)
downloadNetworkManager-e7d18548b9e15ff24b357fc182c1300901495466.tar.gz
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.
Diffstat (limited to 'clients')
-rw-r--r--clients/common/nm-meta-setting-desc.c12
1 files 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;