]> pd.if.org Git - nbds/blobdiff - map/list.c
fix error in validation logic
[nbds] / map / list.c
index ac6b6a570feebffd751b5795e588b3903269747b..0982e59810bab669599a20583e52cb9df9768f69 100644 (file)
@@ -52,7 +52,9 @@ uint64_t ll_count (list_t *ll) {
     uint64_t count = 0;
     node_t *item = ll->head->next;
     while (item) {
-        count++;
+        if (!IS_TAGGED(item->next)) {
+            count++;
+        }
         item = (node_t *)STRIP_TAG(item->next);
     }
     return count;