Skip to contentSkip to conversation

iw: Print help text to "set bitrates" in case of no args

PATCH In review Ola Olsson 2 participants 3 messages Oct 21, 2015

lore
Share & tools
lore

Ola Olsson

author
#0 lore raw

PATCH 1/1 iw: Print help text to "set bitrates" in case of no args

---
 bitrate.c |    3 +++
 1 file changed, 3 insertions(+)
bitrate.c +3 -0
index 4a026a4..974b49c 100644
@@ -110,6 +110,9 @@ static int handle_bitrates(struct nl80211_state *state,
 		S_GI,
 	} parser_state = S_NONE;
 
+	if (argc == 0)
+		return 1;
+
 	for (i = 0; i < argc; i++) {
 		char *end;
 		double tmpd;
Signature · 1 line
1.7.9.5
#1 lore raw

This is incorrect - the help states:

"Not passing any arguments would clear the existing mask (if any)."

johannes

author
#2 lore raw

I totally missed that. You are right!

/Ola

Quoted 5 lines · Johannes Berg

This is incorrect - the help states:

"Not passing any arguments would clear the existing mask (if any)."

johannes