projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add CONST_CAST macro, for casting away "const" more safely.
[pspp]
/
src
/
libpspp
/
ll.h
diff --git
a/src/libpspp/ll.h
b/src/libpspp/ll.h
index 4d0d2eb84a6ba26dd8dfd64735b9113e08a30df0..bf871f6b0f842a0a42726de48364aad08ea4d3ea 100644
(file)
--- a/
src/libpspp/ll.h
+++ b/
src/libpspp/ll.h
@@
-52,6
+52,8
@@
#include <stddef.h>
#include <libpspp/cast.h>
#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
/* 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)
{
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,
}
/* Returns the node following LL in its list,