On Fri, May 29, 2015 at 12:16:03PM +0000, Christoffer Holmstedt wrote: > > if (tb_msg[NL802154_ATTR_CHANNEL]) > - printf("current_channel: %d\n", nla_get_u8(tb_msg[NL802154_ATTR_CHANNEL])); > + { > + unsigned char curr_channel; > + curr_channel = nla_get_u8(tb_msg[NL802154_ATTR_CHANNEL]); > + printf("current_channel: %d (", curr_channel); > + print_freq(nla_get_u8(tb_msg[NL802154_ATTR_PAGE]), curr_channel); Also this is problematic, because we don't check before if tb_msg[NL802154_ATTR_PAGE] isn't null. When you like to use this value there, the easiest way would be: if (tb_msg[NL802154_ATTR_CHANNEL] && tb_msg[NL802154_ATTR_PAGE]) instead of if (tb_msg[NL802154_ATTR_CHANNEL]) above. - Alex -- To unsubscribe from this list: send the line "unsubscribe linux-wpan" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html