summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy1
-rw-r--r--zix/tree.c4
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,
diff --git a/zix/tree.c b/zix/tree.c
index 4dd0897..e0576fb 100644
--- a/zix/tree.c
+++ b/zix/tree.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) {