From 2ff48085a9d59f2cd5eefbb507316462e221981c Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Sun, 18 Jun 2017 00:11:00 +0100 Subject: [PATCH] slist: fix condition for detecting queued item. --- src/dinit-ll.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dinit-ll.h b/src/dinit-ll.h index 4e16d28..267cd51 100644 --- a/src/dinit-ll.h +++ b/src/dinit-ll.h @@ -118,7 +118,7 @@ class slist bool is_queued(T *e) noexcept { auto &node = E(e); - return node.next != nullptr && first != e; + return node.next != nullptr || first == e; } void insert(T *e) noexcept -- 2.25.1