summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Anthony <johnanthony@lavabit.com>2013-06-16 01:32:56 +0100
committerJohn Anthony <johnanthony@lavabit.com>2013-06-16 01:32:56 +0100
commitfad612f3cca0777c5db0d1d6e8c04ecdf6ff1ce8 (patch)
tree2ba42c1fcfa9f484edaf0329571da34e19d03b79
parente1502d862fec495b9fdd29131a30050e82c3d390 (diff)
downloadnyancat-fad612f3cca0777c5db0d1d6e8c04ecdf6ff1ce8.tar.gz
nyancat-fad612f3cca0777c5db0d1d6e8c04ecdf6ff1ce8.tar.bz2
nyancat-fad612f3cca0777c5db0d1d6e8c04ecdf6ff1ce8.zip
Tidied data structure
-rw-r--r--list.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/list.h b/list.h
index bb4473e..8d7d0dd 100644
--- a/list.h
+++ b/list.h
@@ -21,7 +21,8 @@
#include <stdbool.h>
struct list_head {
- struct list_head *next, *prev;
+ struct list_head *next;
+ struct list_head *prev;
};
#define LIST_HEAD_INIT(name) { &(name), &(name) }
@@ -39,10 +40,9 @@ struct list_head {
* This is only for internal list manipulation where we know
* the prev/next entries already!
*/
-static inline void __list_add(struct list_head *new,
- struct list_head *prev,
- struct list_head *next)
-{
+static inline void
+__list_add(struct list_head *new, struct list_head *prev,
+ struct list_head *next) {
next->prev = new;
new->next = next;
new->prev = prev;