Skip to content
Snippets Groups Projects
Commit 6df58ac7 authored by kYc0o's avatar kYc0o
Browse files

gnrc: use correct l2addr print len

parent d171c96e
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,7 @@ extern "C" { ...@@ -36,6 +36,7 @@ extern "C" {
* in bytes. * in bytes.
*/ */
#define GNRC_NETIF_HDR_L2ADDR_MAX_LEN (8) #define GNRC_NETIF_HDR_L2ADDR_MAX_LEN (8)
#define GNRC_NETIF_HDR_L2ADDR_PRINT_LEN (GNRC_NETIF_HDR_L2ADDR_MAX_LEN * 3)
/** /**
* @{ * @{
......
...@@ -89,7 +89,7 @@ static gnrc_pktsnip_t *_recv(gnrc_netdev2_t *gnrc_netdev2) ...@@ -89,7 +89,7 @@ static gnrc_pktsnip_t *_recv(gnrc_netdev2_t *gnrc_netdev2)
gnrc_pktsnip_t *ieee802154_hdr, *netif_hdr; gnrc_pktsnip_t *ieee802154_hdr, *netif_hdr;
gnrc_netif_hdr_t *hdr; gnrc_netif_hdr_t *hdr;
#if ENABLE_DEBUG #if ENABLE_DEBUG
char src_str[GNRC_NETIF_HDR_L2ADDR_MAX_LEN]; char src_str[GNRC_NETIF_HDR_L2ADDR_PRINT_LEN];
#endif #endif
size_t mhr_len = ieee802154_get_frame_hdr_len(pkt->data); size_t mhr_len = ieee802154_get_frame_hdr_len(pkt->data);
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
void gnrc_netif_hdr_print(gnrc_netif_hdr_t *hdr) void gnrc_netif_hdr_print(gnrc_netif_hdr_t *hdr)
{ {
char addr_str[GNRC_NETIF_HDR_L2ADDR_MAX_LEN * 3]; char addr_str[GNRC_NETIF_HDR_L2ADDR_PRINT_LEN];
printf("if_pid: %" PRIkernel_pid " ", hdr->if_pid); printf("if_pid: %" PRIkernel_pid " ", hdr->if_pid);
printf("rssi: %" PRIu8 " ", hdr->rssi); printf("rssi: %" PRIu8 " ", hdr->rssi);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment