pktbuf: fix snip-was-head case for pktbuf_remove_snip

This commit is contained in:
Martine Lenders 2015-04-14 13:46:32 +02:00
parent e9fb853a81
commit 2c46c79fd5

View File

@ -172,12 +172,17 @@ ng_pktsnip_t *ng_pktbuf_start_write(ng_pktsnip_t *pkt);
*
* @param[in] pkt A packet.
* @param[in] snip A snip in the packet.
*
* @return The new reference to @p pkt.
*/
static inline void ng_pktbuf_remove_snip(ng_pktsnip_t *pkt, ng_pktsnip_t *snip)
static inline ng_pktsnip_t *ng_pktbuf_remove_snip(ng_pktsnip_t *pkt,
ng_pktsnip_t *snip)
{
LL_DELETE(pkt, snip);
snip->next = NULL;
ng_pktbuf_release(snip);
return pkt;
}
#ifdef DEVELHELP