]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
tests/atomic: finish the thread early once an invalid value occurs
authorDavid Vašek <david.vasek@nic.cz>
Sat, 4 May 2024 23:42:25 +0000 (01:42 +0200)
committerDavid Vašek <david.vasek@nic.cz>
Mon, 6 May 2024 12:34:51 +0000 (14:34 +0200)
tests/contrib/test_atomic.c

index a2ef876d0ef9719c08ae8603ec41128ec6ae6d6e..4ba93c822f4c23b15322476d106c2f0ef247d4d5 100644 (file)
@@ -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;
                }
        }