diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2020-06-23 18:07:21 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2020-06-23 18:07:21 +0200 |
| commit | 39143df7aed46e83f8c68ea9ad6d24cfdf5a1dd8 (patch) | |
| tree | d04e604dc48369096d672ed8e02449c903bb986e /src/platform/nm-linux-platform.c | |
| parent | 96642ebde58e1eea692aea6a92d33f45452fa9c0 (diff) | |
| parent | 45e8e1149027529194982212c804c0468aa01d98 (diff) | |
Merge branch 'upstream/latest' of https://salsa.debian.org/utopia-team/network-manager into upstream/latest
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; } } } |