about summary refs log tree commit diff
path: root/src/platform/nm-linux-platform.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2020-05-30 00:24:45 +0200
committerMichael Biebl <biebl@debian.org>2020-06-21 12:57:23 +0200
commit58a8f6b71c1cbd20fc4b67386ab030252a8cf3b3 (patch)
tree16e649a120dd8788f2be703732390567686133b9 /src/platform/nm-linux-platform.c
parent7d3ff20eeaa6c7db2503a0289a210b06030b33c5 (diff)
parent45e8e1149027529194982212c804c0468aa01d98 (diff)
Update upstream source from tag 'upstream/1.24.2'
Update to upstream version '1.24.2'
with Debian dir ccbabe9f55adb82b9a243cc1783c175e85723f60
Diffstat (limited to 'src/platform/nm-linux-platform.c')
-rw-r--r--src/platform/nm-linux-platform.c24
1 files changed, 12 insertions, 12 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;
 		}
 	}
 }