All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: linux-wireless@vger.kernel.org
Cc: Samuel Ortiz <samuel.ortiz@intel.com>,
	"John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH] iwmc3200wifi: clarify potentially undefined operation in iwm_scan_ssids
Date: Tue, 16 Nov 2010 16:08:56 -0500	[thread overview]
Message-ID: <1289941736-2057-1-git-send-email-linville@tuxdriver.com> (raw)

  CC [M]  drivers/net/wireless/iwmc3200wifi/commands.o
drivers/net/wireless/iwmc3200wifi/commands.c: In function ‘iwm_scan_ssids’:
drivers/net/wireless/iwmc3200wifi/commands.c:911:15: warning: operation on ‘iwm->scan_id’ may be undefined

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/wireless/iwmc3200wifi/commands.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwmc3200wifi/commands.c b/drivers/net/wireless/iwmc3200wifi/commands.c
index 330c7d9..50dee6a 100644
--- a/drivers/net/wireless/iwmc3200wifi/commands.c
+++ b/drivers/net/wireless/iwmc3200wifi/commands.c
@@ -908,7 +908,7 @@ int iwm_scan_ssids(struct iwm_priv *iwm, struct cfg80211_ssid *ssids,
 		return ret;
 	}
 
-	iwm->scan_id = iwm->scan_id++ % IWM_SCAN_ID_MAX;
+	iwm->scan_id = (iwm->scan_id + 1) % IWM_SCAN_ID_MAX;
 
 	return 0;
 }
-- 
1.7.3.2


                 reply	other threads:[~2010-11-16 21:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1289941736-2057-1-git-send-email-linville@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=samuel.ortiz@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.