From: Luis R. Rodriguez Date: Mon, 20 Dec 2010 17:02:33 +0000 (-0500) Subject: iw: fix country print X-Git-Tag: v0.9.22~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fbc80eb6cf240d94d1ef5b0eb651ffa1ef67f4af;p=thirdparty%2Fiw.git iw: fix country print Using a %s to pring the alpha2 may give us some extra data which will spew out when printing. Fix it by only printing the two characters we know we will get. Signed-off-by: Luis R. Rodriguez --- diff --git a/reg.c b/reg.c index 7f82e08..c4ee1c4 100644 --- a/reg.c +++ b/reg.c @@ -132,7 +132,7 @@ static int print_reg_handler(struct nl_msg *msg, void *arg) } alpha2 = nla_data(tb_msg[NL80211_ATTR_REG_ALPHA2]); - printf("country %s:\n", alpha2); + printf("country %c%c:\n", alpha2[0], alpha2[1]); nla_for_each_nested(nl_rule, tb_msg[NL80211_ATTR_REG_RULES], rem_rule) { struct nlattr *tb_rule[NL80211_FREQUENCY_ATTR_MAX + 1];