diff options
| author | Michael Biebl <biebl@debian.org> | 2020-05-30 00:23:54 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-05-30 00:23:54 +0200 |
| commit | 45e8e1149027529194982212c804c0468aa01d98 (patch) | |
| tree | f3acb5e5824dd8b13f1a48bb516b0c92c5f052fd /src/platform/nm-linux-platform.c | |
| parent | d460892bbfece74fb6d3cd846bf6ef548290be41 (diff) | |
New upstream version 1.24.2 upstream/1.24.2
Diffstat (limited to 'src/platform/nm-linux-platform.c')
| -rw-r--r-- | src/platform/nm-linux-platform.c | 24 |
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; } } } |