diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2020-06-23 18:07:55 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2020-06-23 18:09:28 +0200 |
| commit | 2b0b0375d38edd687055f84be895822801618c4a (patch) | |
| tree | acd3aab5044a9bc5950925161b591a08b6e60f53 /src/platform/nm-linux-platform.c | |
| parent | 093c9db7b2a46e6042009e703e2e891abd2d2ba3 (diff) | |
| parent | 5ed4e66e01b005212aee22c255c9c6b2a4b040a9 (diff) | |
Merge remote-tracking branch 'salsa/debian/master' into ubuntu/master
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; } } } |