Module Name:    src
Committed By:   riastradh
Date:           Mon Aug 27 07:03:50 UTC 2018

Modified Files:
        src/sys/external/bsd/common/include/linux: list.h

Log Message:
Fix hlist_for_each_entry_safe: temp is hlist_node, not element.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/external/bsd/common/include/linux/list.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/common/include/linux/list.h
diff -u src/sys/external/bsd/common/include/linux/list.h:1.12 src/sys/external/bsd/common/include/linux/list.h:1.13
--- src/sys/external/bsd/common/include/linux/list.h:1.12	Mon Aug 27 06:57:58 2018
+++ src/sys/external/bsd/common/include/linux/list.h	Mon Aug 27 07:03:50 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: list.h,v 1.12 2018/08/27 06:57:58 riastradh Exp $	*/
+/*	$NetBSD: list.h,v 1.13 2018/08/27 07:03:50 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -307,11 +307,10 @@ hlist_del_init(struct hlist_node *node)
 			hlist_entry(hlist_first(HEAD), typeof(*(VAR)),	      \
 			    FIELD)),					      \
 		    (NEXT) = ((VAR) == NULL ? NULL :			      \
-			hlist_next(&(VAR)->FIELD) == NULL ? NULL :	      \
-			    hlist_entry(hlist_next(&(VAR)->FIELD),	      \
-				typeof(*(VAR)), FIELD));		      \
+			hlist_next(&(VAR)->FIELD));			      \
 		(VAR) != NULL;						      \
-	        (VAR) = (NEXT))
+	        (VAR) = ((NEXT) == NULL ? NULL :			      \
+			    hlist_entry((NEXT), typeof(*(VAR)), FIELD)))
 
 #define	hlist_add_behind_rcu(n, p)	pslist_writer_insert_after(p, n)
 #define	hlist_add_head_rcu(n, h)	pslist_writer_insert_head(h, n)

Reply via email to