]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - include/splay.h
Fix assertions inserting duplicate values into a splay
[thirdparty/squid.git] / include / splay.h
index acf42709ea0ec9c51cc3bb0f9c20f511344ffced..bc2a3d30b9ce46ddef751930b865c18d71243614 100644 (file)
@@ -299,7 +299,9 @@ template <class V>
 void
 Splay<V>::insert(Value const &value, SPLAYCMP *compare)
 {
-    assert (find (value, compare) == NULL);
+    if (find(value, compare) != NULL) // ignore duplicates
+        return;
+
     if (head == NULL)
         head = new SplayNode<V>(value);
     else