Add CONST_CAST macro, for casting away "const" more safely.
[pspp-builds.git] / src / libpspp / ll.h
index 4d0d2eb84a6ba26dd8dfd64735b9113e08a30df0..bf871f6b0f842a0a42726de48364aad08ea4d3ea 100644 (file)
@@ -52,6 +52,8 @@
 #include <stddef.h>
 #include <libpspp/cast.h>
 
+#include <libpspp/cast.h>
+
 /* Embedded, circular doubly linked list.
 
    Each list contains a single "null" element that separates the
@@ -380,7 +382,7 @@ ll_tail (const struct ll_list *list)
 static inline struct ll *
 ll_null (const struct ll_list *list)
 {
-  return (struct ll *) &list->null;
+  return CONST_CAST (struct ll *, &list->null);
 }
 
 /* Returns the node following LL in its list,