diff options
author | Ben Chan <benchan@chromium.org> | 2013-05-06 00:24:25 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-05-06 09:36:53 +0200 |
commit | 2eee2e48ba65a24b17a0b91a619027a0c6f3185a (patch) | |
tree | 8a1326bb17ddd8bfa9062352f23ddd5da3614e97 | |
parent | 9f702aed0297ff180fd6b3bce0e30db95a082e81 (diff) | |
download | ModemManager-2eee2e48ba65a24b17a0b91a619027a0c6f3185a.tar.gz |
sierra: remove comparison of unsigned expression >= 0
This patch removes an unnecessary check of unsigned expression >= 0,
which also fixes the following clang warnings:
sierra/mm-broadband-modem-sierra.c:570:18: error: comparison of
unsigned expression >= 0 is always true
[-Werror,-Wtautological-compare]
mode >= 0 &&
~~~~ ^ ~
Bug reported on https://code.google.com/p/chromium/issues/detail?id=235989
Patched by Yunlian Jiang <yunlian@chromium.org>
-rw-r--r-- | plugins/sierra/mm-broadband-modem-sierra.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/sierra/mm-broadband-modem-sierra.c b/plugins/sierra/mm-broadband-modem-sierra.c index 7cb8e6cf1..f8cfb7439 100644 --- a/plugins/sierra/mm-broadband-modem-sierra.c +++ b/plugins/sierra/mm-broadband-modem-sierra.c @@ -566,9 +566,7 @@ selrat_query_ready (MMBaseModem *self, if (g_regex_match_full (r, response, strlen (response), 0, 0, &match_info, &error)) { guint mode; - if (mm_get_uint_from_match_info (match_info, 1, &mode) && - mode >= 0 && - mode <= 7) { + if (mm_get_uint_from_match_info (match_info, 1, &mode) && mode <= 7) { switch (mode) { case 0: result.allowed = MM_MODEM_MODE_ANY; |