summaryrefslogtreecommitdiffstats
path: root/src/basic/list.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-10-17 21:05:33 +0200
committerLennart Poettering <lennart@poettering.net>2018-10-17 21:13:02 +0200
commit3088305166df1532778e88a96a293f88315f9f25 (patch)
tree3d60f1192ee22147e5c3c4e1e6d7d4277d497fcc /src/basic/list.h
parentsulogin-shell: Use force if SYSTEMD_SULOGIN_FORCE set (diff)
downloadsystemd-3088305166df1532778e88a96a293f88315f9f25.tar.xz
systemd-3088305166df1532778e88a96a293f88315f9f25.zip
list: fix double avaluation in LIST_APPEND()
Diffstat (limited to '')
-rw-r--r--src/basic/list.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/list.h b/src/basic/list.h
index 643e0bea88..040680c30a 100644
--- a/src/basic/list.h
+++ b/src/basic/list.h
@@ -38,9 +38,9 @@
/* Append an item to the list */
#define LIST_APPEND(name,head,item) \
do { \
- typeof(*(head)) *_tail; \
- LIST_FIND_TAIL(name,head,_tail); \
- LIST_INSERT_AFTER(name,head,_tail,item); \
+ typeof(*(head)) **_hhead = &(head), *_tail; \
+ LIST_FIND_TAIL(name, *_hhead, _tail); \
+ LIST_INSERT_AFTER(name, *_hhead, _tail, item); \
} while (false)
/* Remove an item from the list */