Skip to content

Commit

Permalink
gnrc ipv6: replace check by assert
Browse files Browse the repository at this point in the history
The existence of netif is mandatory here.
  • Loading branch information
OlegHahm committed Mar 25, 2016
1 parent 561b8a7 commit 856e1ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,9 +764,8 @@ static void _receive(gnrc_pktsnip_t *pkt)

netif = gnrc_pktsnip_search_type(pkt, GNRC_NETTYPE_NETIF);

if (netif != NULL) {
iface = ((gnrc_netif_hdr_t *)netif->data)->if_pid;
}
assert(netif);
iface = ((gnrc_netif_hdr_t *)netif->data)->if_pid;

first_ext = pkt;

Expand Down

0 comments on commit 856e1ee

Please sign in to comment.