summary refs log tree commit diff
path: root/src/platform
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform')
-rw-r--r--src/platform/nm-linux-platform.c24
-rw-r--r--src/platform/nm-platform.h4
-rw-r--r--src/platform/tests/test-common.c2
3 files changed, 16 insertions, 14 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index 014cca71..a721fc7c 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -726,9 +726,9 @@ _link_type_from_rtnl_type (const char *name) \
 	}
 
 	{
-		unsigned imin = 0;
-		unsigned imax = (G_N_ELEMENTS (LIST) - 1);
-		unsigned imid = (G_N_ELEMENTS (LIST) - 1) / 2;
+		int imin = 0;
+		int imax = (G_N_ELEMENTS (LIST) - 1);
+		int imid = (G_N_ELEMENTS (LIST) - 1) / 2;
 
 		for (;;) {
 			const int cmp = strcmp (link_descs[LIST[imid]].rtnl_type, name);
@@ -737,14 +737,14 @@ _link_type_from_rtnl_type (const char *name) \
 				return LIST[imid];
 
 			if (cmp < 0)
-				imin = imid + 1u;
+				imin = imid + 1;
 			else
-				imax = imid - 1u;
+				imax = imid - 1;
 
 			if (G_UNLIKELY (imin > imax))
 				return NM_LINK_TYPE_NONE;
 
-			imid = (imin + imax) / 2u;
+			imid = (imin + imax) / 2;
 		}
 	}
 }
@@ -787,9 +787,9 @@ _link_type_from_devtype (const char *name) \
 	}
 
 	{
-		unsigned imin = 0;
-		unsigned imax = (G_N_ELEMENTS (LIST) - 1);
-		unsigned imid = (G_N_ELEMENTS (LIST) - 1) / 2;
+		int imin = 0;
+		int imax = (G_N_ELEMENTS (LIST) - 1);
+		int imid = (G_N_ELEMENTS (LIST) - 1) / 2;
 
 		for (;;) {
 			const int cmp = strcmp (link_descs[LIST[imid]].devtype, name);
@@ -798,14 +798,14 @@ _link_type_from_devtype (const char *name) \
 				return LIST[imid];
 
 			if (cmp < 0)
-				imin = imid + 1u;
+				imin = imid + 1;
 			else
-				imax = imid - 1u;
+				imax = imid - 1;
 
 			if (G_UNLIKELY (imin > imax))
 				return NM_LINK_TYPE_NONE;
 
-			imid = (imin + imax) / 2u;
+			imid = (imin + imax) / 2;
 		}
 	}
 }
diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h
index 7edaaf58..7d10d909 100644
--- a/src/platform/nm-platform.h
+++ b/src/platform/nm-platform.h
@@ -1511,13 +1511,15 @@ nm_platform_link_ip6tnl_add (NMPlatform *self,
 static inline int
 nm_platform_link_ip6gre_add (NMPlatform *self,
                              const char *name,
+                             const void *address,
+                             size_t address_len,
                              const NMPlatformLnkIp6Tnl *props,
                              const NMPlatformLink **out_link)
 {
 	g_return_val_if_fail (props, -NME_BUG);
 	g_return_val_if_fail (props->is_gre, -NME_BUG);
 
-	return nm_platform_link_add (self, props->is_tap ? NM_LINK_TYPE_IP6GRETAP : NM_LINK_TYPE_IP6GRE, name, 0, NULL, 0, props, out_link);
+	return nm_platform_link_add (self, props->is_tap ? NM_LINK_TYPE_IP6GRETAP : NM_LINK_TYPE_IP6GRE, name, 0, address, address_len, props, out_link);
 }
 
 static inline int
diff --git a/src/platform/tests/test-common.c b/src/platform/tests/test-common.c
index f393ae93..f28dfa3a 100644
--- a/src/platform/tests/test-common.c
+++ b/src/platform/tests/test-common.c
@@ -1380,7 +1380,7 @@ nmtstp_link_ip6gre_add (NMPlatform *platform,
 			                                      100);
 		}
 	} else
-		success = NMTST_NM_ERR_SUCCESS (nm_platform_link_ip6gre_add (platform, name, lnk, &pllink));
+		success = NMTST_NM_ERR_SUCCESS (nm_platform_link_ip6gre_add (platform, name, NULL, 0, lnk, &pllink));
 
 	_assert_pllink (platform, success, pllink, name, lnk->is_tap ? NM_LINK_TYPE_IP6GRETAP : NM_LINK_TYPE_IP6GRE);