yaffsfs.c: Fix NULL dereference in yaffs_unmount2_reldev()
[yaffs2.git] / direct / yaffs_list.h
index f1c52544b27f2c4524a4800de29c0cc11ba971e6..68d2c67ba6679b3c866ae442162b028a8769080d 100644 (file)
@@ -1,8 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2011 Aleph One Ltd.
- *   for Toby Churchill Ltd and Brightstar Engineering
+ * Copyright (C) 2002-2018 Aleph One Ltd.
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
  *
@@ -24,8 +23,6 @@
 #define __YAFFS_LIST_H__
 
 
-#include "yportenv.h"
-
 /*
  * This is a simple doubly linked list implementation that matches the
  * way the Linux kernel doubly linked list implementation works.
@@ -38,6 +35,10 @@ struct list_head {
 
 
 /* Initialise a static list */
+#ifdef LIST_HEAD
+#undef LIST_HEAD
+#endif
+
 #define LIST_HEAD(name) \
 struct list_head name = { &(name), &(name)}
 
@@ -121,7 +122,8 @@ static inline int list_empty(struct list_head *entry)
 
 #define list_for_each_safe(itervar, save_var, list) \
        for (itervar = (list)->next, save_var = (list)->next->next; \
-               itervar != (list); itervar = save_var, save_var = save_var->next)
+               itervar != (list); \
+               itervar = save_var, save_var = save_var->next)
 
 
 #endif