[riot-notifications] [RIOT] gnrc_pktbuf_static: fix DEBUG (#3852)

Cenk Gündoğan notifications at github.com
Wed Sep 16 14:04:53 CEST 2015


> @@ -97,7 +97,8 @@ gnrc_pktsnip_t *gnrc_pktbuf_mark(gnrc_pktsnip_t *pkt, size_t size, gnrc_nettype_
>      if ((size == 0) || (pkt == NULL) || (size > pkt->size) || (pkt->data == NULL)) {
>          DEBUG("pktbuf: size == 0 (was %u) or pkt == NULL (was %p) or "
>                "size > pkt->size (was %u) or pkt->data == NULL (was %p)\n",
> -              (unsigned)size, (void *)pkt, (unsigned)pkt->size, pkt->data);
> +              (unsigned)size, (void *)pkt, (pkt ? (unsigned)pkt->size : -1U),

`-1U` is the biggest number that can be represented, it's definitely not `some random number`. I thought seeing the largest number possible would raise eyebrows more effectively, than just seeing `0` (which is a more likely in valid outputs)

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3852/files#r39620841
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150916/684670d8/attachment.html>


More information about the notifications mailing list