Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/common/include/linux Fix hlist_for_each_ent...
details: https://anonhg.NetBSD.org/src/rev/1def2c7b4d73
branches: trunk
changeset: 365871:1def2c7b4d73
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 07:03:50 2018 +0000
description:
Fix hlist_for_each_entry_safe: temp is hlist_node, not element.
diffstat:
sys/external/bsd/common/include/linux/list.h | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (24 lines):
diff -r 53667c4f4655 -r 1def2c7b4d73 sys/external/bsd/common/include/linux/list.h
--- a/sys/external/bsd/common/include/linux/list.h Mon Aug 27 07:03:39 2018 +0000
+++ b/sys/external/bsd/common/include/linux/list.h Mon Aug 27 07:03:50 2018 +0000
@@ -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_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)
Home |
Main Index |
Thread Index |
Old Index