-/* Licensed under LGPLv2.1+ - see LICENSE file for details */
+/* Licensed under BSD-MIT - see LICENSE file for details */
#ifndef CCAN_LIST_H
#define CCAN_LIST_H
#include <stdbool.h>
* Example:
* struct child *first;
* first = list_top(&parent->children, struct child, list);
+ * if (!first)
+ * printf("Empty list!\n");
*/
#define list_top(h, type, member) \
((type *)list_top_((h), list_off_(type, member)))
* Example:
* struct child *last;
* last = list_tail(&parent->children, struct child, list);
+ * if (!last)
+ * printf("Empty list!\n");
*/
#define list_tail(h, type, member) \
((type *)list_tail_((h), list_off_(type, member)))