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/37975a6c5440
branches:  trunk
changeset: 365816:37975a6c5440
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 06:51:38 2018 +0000

description:
Fix hlist_for_each_entry to use the specified field.

diffstat:

 sys/external/bsd/common/include/linux/list.h |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r efcaf57ca85e -r 37975a6c5440 sys/external/bsd/common/include/linux/list.h
--- a/sys/external/bsd/common/include/linux/list.h      Mon Aug 27 06:51:29 2018 +0000
+++ b/sys/external/bsd/common/include/linux/list.h      Mon Aug 27 06:51:38 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: list.h,v 1.7 2018/08/27 06:50:03 riastradh Exp $       */
+/*     $NetBSD: list.h,v 1.8 2018/08/27 06:51:38 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -297,7 +297,8 @@
                            FIELD));                                          \
                (VAR) != NULL;                                                \
                (VAR) = (hlist_next(VAR) == NULL ? NULL :                     \
-                       hlist_entry(hlist_next(VAR), typeof(*(VAR)), FIELD)))
+                       hlist_entry(hlist_next(&(VAR)->FIELD), typeof(*(VAR)),\
+                           FIELD)))
 
 #define        hlist_for_each_entry_safe(VAR, NEXT, HEAD, FIELD)                     \
        for ((VAR) = (hlist_first(HEAD) == NULL ? NULL :                      \



Home | Main Index | Thread Index | Old Index