summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Vašek <david.vasek@nic.cz>2024-05-05 01:42:25 +0200
committerDavid Vašek <david.vasek@nic.cz>2024-05-06 14:34:51 +0200
commitb323b0c5d96cd8bf5d28086d97b6085ed3a1f062 (patch)
treef12f22660538de39a659ea528ac3d1fb6de87dfa
parentserver/xdp: add a check for non-null TCP table (Clang analyzer) (diff)
downloadknot-b323b0c5d96cd8bf5d28086d97b6085ed3a1f062.tar.xz
knot-b323b0c5d96cd8bf5d28086d97b6085ed3a1f062.zip
tests/atomic: finish the thread early once an invalid value occurs
-rw-r--r--tests/contrib/test_atomic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/contrib/test_atomic.c b/tests/contrib/test_atomic.c
index a2ef876d0..4ba93c822 100644
--- a/tests/contrib/test_atomic.c
+++ b/tests/contrib/test_atomic.c
@@ -83,6 +83,7 @@ static int thread_xchg(struct dthread *thread)
// Non-atomic counter, won't be accurate!
// However, it's sufficient for fault detection.
errors++;
+ return 0;
}
}