1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-29 00:11:16 +01:00

pktbuf: assert for potential null pointer

In practice, this should not happen, since `_first_unused` should be
already set, if `_too_small_hole()` returns true.
This commit is contained in:
Oleg Hahm 2015-08-18 14:19:23 +02:00
parent b68213a410
commit 85fe445db8

View File

@ -429,6 +429,8 @@ static inline bool _too_small_hole(_unused_t *a, _unused_t *b)
static inline _unused_t *_merge(_unused_t *a, _unused_t *b)
{
assert(b != NULL);
a->next = b->next;
a->size = b->size + ((uint8_t *)b - (uint8_t *)a);
return a;