lib: Tweaks to linked list macros

  * lib/linklist.h

    - Change the listnextnode, listhead and listtail macros so that
      they allow the list pointer to be NULL.

    - Modify the ALL_LIST_ELEMENTS* macros such that they clear the
      data pointer at the beginning and end of the loop.

From: Josh Bailey <joshb@google.com>
Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@diac24.net>
1 file changed