Skip to content

Commit

Permalink
fixup! gnrc_pktbuf_static: fix RIOT-OS#5748
Browse files Browse the repository at this point in the history
One hug more; one more hug. One. Hug. More!!!1!

https://www.youtube.com/watch?v=IddP8AAIGTQ
  • Loading branch information
miri64 committed Dec 14, 2016
1 parent 6d820d1 commit d46c603
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/net/gnrc/pktbuf_static/gnrc_pktbuf_static.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ static void *_pktbuf_alloc(size_t size)
else {
_unused_t *new = (_unused_t *)(((uint8_t *)ptr) + size);

if (((((uint8_t *)new) - &_pktbuf[0]) + sizeof(_unused_t)) > GNRC_PKTBUF_SIZE) {
if (((((uint8_t *)new) - &(_pktbuf[0])) + sizeof(_unused_t)) > GNRC_PKTBUF_SIZE) {
/* content of new would exceed packet buffer size so set to NULL */
_first_unused = NULL;
}
Expand Down

0 comments on commit d46c603

Please sign in to comment.