From: Johannes Berg Date: Fri, 18 Sep 2015 08:54:17 +0000 (+0200) Subject: iw: fix off-by-one X-Git-Tag: v4.3~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=516ef62a816143e7d2e4cdb53847eb80b7a9c286;p=thirdparty%2Fiw.git iw: fix off-by-one An off-by-one prevented printing the very last command, fix it. Signed-off-by: Johannes Berg --- diff --git a/info.c b/info.c index 4ce997e..c23e378 100644 --- a/info.c +++ b/info.c @@ -672,7 +672,7 @@ static int handle_commands(struct nl80211_state *state, struct nl_msg *msg, int argc, char **argv, enum id_input id) { int i; - for (i = 1; i < NL80211_CMD_MAX; i++) + for (i = 1; i <= NL80211_CMD_MAX; i++) printf("%d (0x%x): %s\n", i, i, command_name(i)); /* don't send netlink messages */ return 2;