You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by vi...@apache.org on 2017/02/23 22:33:15 UTC

[21/50] incubator-mynewt-core git commit: queue.h - Revert recent changes.

queue.h - Revert recent changes.

Preserve original queue.h semantics, as distasteful as they may be!


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/4f5dd65c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/4f5dd65c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/4f5dd65c

Branch: refs/heads/sensors_branch
Commit: 4f5dd65cfe508c14685ecc617081e398f1c88981
Parents: 4f4f687
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Feb 14 11:58:01 2017 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Feb 14 11:58:01 2017 -0800

----------------------------------------------------------------------
 kernel/os/include/os/queue.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/4f5dd65c/kernel/os/include/os/queue.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/queue.h b/kernel/os/include/os/queue.h
index a3a0790..faffd85 100755
--- a/kernel/os/include/os/queue.h
+++ b/kernel/os/include/os/queue.h
@@ -158,11 +158,10 @@ struct {                                                \
     }                                                       \
     else {                                                  \
         struct type *curelm = SLIST_FIRST((head));          \
-        while (SLIST_NEXT(curelm, field) &&                 \
-               SLIST_NEXT(curelm, field) != (elm)) {        \
-              curelm = SLIST_NEXT(curelm, field);           \
-        }                                                   \
-        SLIST_NEXT(curelm, field) = SLIST_NEXT(elm, field); \
+        while (SLIST_NEXT(curelm, field) != (elm))          \
+            curelm = SLIST_NEXT(curelm, field);             \
+        SLIST_NEXT(curelm, field) =                         \
+            SLIST_NEXT(SLIST_NEXT(curelm, field), field);   \
     }                                                       \
 } while (0)