diff options
-rw-r--r-- | .clang-tidy | 1 | ||||
-rw-r--r-- | zix/tree.c | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/.clang-tidy b/.clang-tidy index 91058d9..a454239 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,7 +3,6 @@ Checks: > -*-magic-numbers, -*-uppercase-literal-suffix, -android-cloexec-fopen, - -bugprone-branch-clone, -bugprone-suspicious-string-compare, -cert-err34-c, -cert-msc30-c, @@ -350,9 +350,7 @@ zix_tree_insert(ZixTree* t, void* e, ZixTreeIter** ti) cmp = t->cmp(e, n->data, t->cmp_data); if (cmp < 0) { n = n->left; - } else if (cmp > 0) { - n = n->right; - } else if (t->allow_duplicates) { + } else if (cmp > 0 || t->allow_duplicates) { n = n->right; } else { if (ti) { |