X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Flist%2Flist.c;h=3d5811011bcc1e034dc1571a622162e8bbfeede6;hp=0a9e4e4d2d5d092ef1449b82c4a72781033fadc9;hb=4f14d7bbd5afcda4fd0f1f70e8c9aae2a929c4d4;hpb=a8b248ea9de55316cac4423a99a727ca7b54e0fc diff --git a/ccan/list/list.c b/ccan/list/list.c index 0a9e4e4d..3d581101 100644 --- a/ccan/list/list.c +++ b/ccan/list/list.c @@ -2,9 +2,9 @@ #include #include "list.h" -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) { - struct list_node *n, *p; + const struct list_node *n, *p; int count = 0; if (h->n.next == &h->n) { @@ -15,7 +15,7 @@ struct list_head *list_check(struct list_head *h, const char *abortstr) abortstr, h); abort(); } - return h; + return (struct list_head *)h; } for (p = &h->n, n = h->n.next; n != &h->n; p = n, n = n->next) { @@ -29,5 +29,5 @@ struct list_head *list_check(struct list_head *h, const char *abortstr) abort(); } } - return h; + return (struct list_head *)h; }