Linux wireless drivers development
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net
Subject: [PATCH] iw: fix regression in tx power validation
Date: Mon,  7 Nov 2011 18:49:51 +0100	[thread overview]
Message-ID: <1320688191-24689-1-git-send-email-nbd@openwrt.org> (raw)

Only bail out if the last character is *not* \0
---
 phy.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/phy.c b/phy.c
index 91042b4..d9090fd 100644
--- a/phy.c
+++ b/phy.c
@@ -293,7 +293,7 @@ static int handle_txpower(struct nl80211_state *state,
 		}
 
 		mbm = strtol(argv[1], &endptr, 10);
-		if (!*endptr)
+		if (*endptr)
 			return 2;
 		NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_TX_POWER_LEVEL, mbm);
 	} else if (argc != 1)
-- 
1.7.3.2


             reply	other threads:[~2011-11-07 17:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-07 17:49 Felix Fietkau [this message]
2011-11-07 17:58 ` [PATCH] iw: fix regression in tx power validation Johannes Berg

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=1320688191-24689-1-git-send-email-nbd@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox