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>
This commit is contained in:
Ben Chan
2013-05-06 00:24:25 -07:00
committed by Aleksander Morgado
parent 9f702aed02
commit 2eee2e48ba

View File

@@ -566,9 +566,7 @@ selrat_query_ready (MMBaseModem *self,
if (g_regex_match_full (r, response, strlen (response), 0, 0, &match_info, &error)) { if (g_regex_match_full (r, response, strlen (response), 0, 0, &match_info, &error)) {
guint mode; guint mode;
if (mm_get_uint_from_match_info (match_info, 1, &mode) && if (mm_get_uint_from_match_info (match_info, 1, &mode) && mode <= 7) {
mode >= 0 &&
mode <= 7) {
switch (mode) { switch (mode) {
case 0: case 0:
result.allowed = MM_MODEM_MODE_ANY; result.allowed = MM_MODEM_MODE_ANY;