X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Flist%2Flist.c;h=3d5811011bcc1e034dc1571a622162e8bbfeede6;hp=b72f8f67d87705c7af25af874ec08269c6080e41;hb=9ca74a8e616261a3afebcc52472a25f2d551e2b6;hpb=650c775ff00cccd03fc84e7789a03c51d9839004 diff --git a/ccan/list/list.c b/ccan/list/list.c index b72f8f67..3d581101 100644 --- a/ccan/list/list.c +++ b/ccan/list/list.c @@ -1,10 +1,10 @@ #include #include -#include "list/list.h" +#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; }