slist: fix condition for detecting queued item.
authorDavin McCall <davmac@davmac.org>
Sat, 17 Jun 2017 23:11:00 +0000 (00:11 +0100)
committerDavin McCall <davmac@davmac.org>
Sat, 17 Jun 2017 23:11:00 +0000 (00:11 +0100)
src/dinit-ll.h

index 4e16d2874ef4baf72a1523b32edcc1dce7f52f4d..267cd512ec128782aa6f9e1cae6bdc62e0697731 100644 (file)
@@ -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