diff options
Diffstat (limited to 'tools/firewire/list.h')
-rw-r--r-- | tools/firewire/list.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/firewire/list.h b/tools/firewire/list.h index fa119dd371fe..41f4bdadf634 100644 --- a/tools/firewire/list.h +++ b/tools/firewire/list.h | |||
@@ -1,46 +1,46 @@ | |||
1 | struct list { | 1 | struct list { |
2 | struct list *next, *prev; | 2 | struct list *next, *prev; |
3 | }; | 3 | }; |
4 | 4 | ||
5 | static inline void | 5 | static inline void |
6 | list_init(struct list *list) | 6 | list_init(struct list *list) |
7 | { | 7 | { |
8 | list->next = list; | 8 | list->next = list; |
9 | list->prev = list; | 9 | list->prev = list; |
10 | } | 10 | } |
11 | 11 | ||
12 | static inline int | 12 | static inline int |
13 | list_empty(struct list *list) | 13 | list_empty(struct list *list) |
14 | { | 14 | { |
15 | return list->next == list; | 15 | return list->next == list; |
16 | } | 16 | } |
17 | 17 | ||
18 | static inline void | 18 | static inline void |
19 | list_insert(struct list *link, struct list *new_link) | 19 | list_insert(struct list *link, struct list *new_link) |
20 | { | 20 | { |
21 | new_link->prev = link->prev; | 21 | new_link->prev = link->prev; |
22 | new_link->next = link; | 22 | new_link->next = link; |
23 | new_link->prev->next = new_link; | 23 | new_link->prev->next = new_link; |
24 | new_link->next->prev = new_link; | 24 | new_link->next->prev = new_link; |
25 | } | 25 | } |
26 | 26 | ||
27 | static inline void | 27 | static inline void |
28 | list_append(struct list *list, struct list *new_link) | 28 | list_append(struct list *list, struct list *new_link) |
29 | { | 29 | { |
30 | list_insert((struct list *)list, new_link); | 30 | list_insert((struct list *)list, new_link); |
31 | } | 31 | } |
32 | 32 | ||
33 | static inline void | 33 | static inline void |
34 | list_prepend(struct list *list, struct list *new_link) | 34 | list_prepend(struct list *list, struct list *new_link) |
35 | { | 35 | { |
36 | list_insert(list->next, new_link); | 36 | list_insert(list->next, new_link); |
37 | } | 37 | } |
38 | 38 | ||
39 | static inline void | 39 | static inline void |
40 | list_remove(struct list *link) | 40 | list_remove(struct list *link) |
41 | { | 41 | { |
42 | link->prev->next = link->next; | 42 | link->prev->next = link->next; |
43 | link->next->prev = link->prev; | 43 | link->next->prev = link->prev; |
44 | } | 44 | } |
45 | 45 | ||
46 | #define list_entry(link, type, member) \ | 46 | #define list_entry(link, type, member) \ |