X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Flist%2Flist.h;h=d47e13253b56596d83fac64cf7fef1b907b9dc40;hp=e1f07a0e043ae7f460d2650e2acdf39d468ab5aa;hb=165727526f785b05f67f3d88f9518a0a840acbbf;hpb=0c492447b997ad50c289314a7ba41cca6bcc1c3c diff --git a/ccan/list/list.h b/ccan/list/list.h index e1f07a0e..d47e1325 100644 --- a/ccan/list/list.h +++ b/ccan/list/list.h @@ -62,7 +62,7 @@ struct list_head * printf(" -> %s\n", c->name); * } */ -struct list_head *list_check(struct list_head *h, const char *abortstr); +struct list_head *list_check(const struct list_head *h, const char *abortstr); #ifdef CCAN_LIST_DEBUG #define debug_list(h) list_check((h), __func__) @@ -166,7 +166,7 @@ static inline void list_del(struct list_node *n) * Example: * assert(list_empty(&parent->children) == (parent->num_children == 0)); */ -static inline bool list_empty(struct list_head *h) +static inline bool list_empty(const struct list_head *h) { (void)debug_list(h); return h->n.next == &h->n;