Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] iw: fix regression in tx power validation
@ 2011-11-07 17:49 Felix Fietkau
  2011-11-07 17:58 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Fietkau @ 2011-11-07 17:49 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-07 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-07 17:49 [PATCH] iw: fix regression in tx power validation Felix Fietkau
2011-11-07 17:58 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox