trafgen: fix NULL pointer dereference in -i option parsing
[netsniff-ng-new.git] / urcu-list-compat.h
blob44117adc7add0a1dd3467168f7c7818c0d64ccf9
1 #ifndef URCU_LIST_COMPAT_H
2 #define URCU_LIST_COMPAT_H
4 #include <urcu/list.h>
6 #ifndef cds_list_last_entry
7 #define cds_list_last_entry(ptr, type, member) \
8 cds_list_entry((ptr)->prev, type, member)
9 #endif
11 #ifndef cds_list_next_entry
12 #define cds_list_next_entry(pos, member) \
13 cds_list_entry((pos)->member.next, typeof(*(pos)), member)
14 #endif
16 #ifndef cds_list_prev_entry
17 #define cds_list_prev_entry(pos, member) \
18 cds_list_entry((pos)->member.prev, typeof(*(pos)), member)
19 #endif
21 #endif /* URCU_LIST_COMPAT_H */