summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-02-17 22:22:59 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-02-17 22:22:59 +0300
commit32d1999a3cce1b39083167efc9e4d5ced2e5b410 (patch)
tree651031f1e44c4c7e91276bc62fce80f67a6c5488
parent6d3ad32c4c12607bce64a3d2fd2dc188acd423bb (diff)
downloadlibatomic_ops-32d1999a3cce1b39083167efc9e4d5ced2e5b410.tar.gz
Do not output multiple 'Found duplicate' error messages in test_stack
(fix of commit dfc5459a6) * tests/test_stack.c (check_list): Call abort() immediately if a duplicate element is found (instead of incrementing err_cnt).
-rw-r--r--tests/test_stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_stack.c b/tests/test_stack.c
index 155d695..84b240b 100644
--- a/tests/test_stack.c
+++ b/tests/test_stack.c
@@ -146,7 +146,7 @@ void check_list(int n)
else if (marks[i] != 0)
{
fprintf(stderr, "Found duplicate list element %d\n", i);
- err_cnt++;
+ abort();
}
else marks[i] = 1;
}