list: fix list_prev and list_next on const lists.
[ccan] / ccan / list / list.h
index 03614873ef6a718aaaadec32a27356f82c6c7912..3153d550824b9b8dd7940b02e4bb414cbffb2aa9 100644 (file)
@@ -604,8 +604,8 @@ static inline struct list_node *list_node_from_off_(void *ptr, size_t off)
 #endif
 
 /* Returns member, or NULL if at end of list. */
-static inline void *list_entry_or_null(struct list_head *h,
-                                      struct list_node *n,
+static inline void *list_entry_or_null(const struct list_head *h,
+                                      const struct list_node *n,
                                       size_t off)
 {
        if (n == &h->n)