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 <lrodriguez@xxxxxxxxxxx> --- reg.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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]; -- 1.7.3.2.90.gd4c43 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html