[MM] [PATCH v2] sierra: remove comparison of unsigned expression >= 0
- From: Ben Chan <benchan chromium org>
- To: networkmanager-list gnome org
- Cc: Aleksander Morgado <aleksander lanedo com>
- Subject: [MM] [PATCH v2] sierra: remove comparison of unsigned expression >= 0
- Date: Mon, 6 May 2013 00:24:25 -0700
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>
---
plugins/sierra/mm-broadband-modem-sierra.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/plugins/sierra/mm-broadband-modem-sierra.c b/plugins/sierra/mm-broadband-modem-sierra.c
index 7cb8e6c..f8cfb74 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;
--
1.8.2.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]