aboutsummaryrefslogtreecommitdiff
path: root/misc/tst-tsearch.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-05-03 09:22:33 +0200
committerFlorian Weimer <fweimer@redhat.com>2019-05-03 09:22:33 +0200
commitac3da35de5cf113edfd514c2fc8ccbaed4536aaf (patch)
tree9a969e5abc89f6d17f0a57ad5d82bb21330d7945 /misc/tst-tsearch.c
parent7dfde28a211400dc3b52610198478325a487e02b (diff)
downloadglibc-ac3da35de5cf113edfd514c2fc8ccbaed4536aaf.tar
glibc-ac3da35de5cf113edfd514c2fc8ccbaed4536aaf.tar.gz
glibc-ac3da35de5cf113edfd514c2fc8ccbaed4536aaf.tar.bz2
glibc-ac3da35de5cf113edfd514c2fc8ccbaed4536aaf.zip
misc/tst-tsearch: Additional explicit error checking
This avoids an undefined variable warning with certain GCC versions.
Diffstat (limited to 'misc/tst-tsearch.c')
-rw-r--r--misc/tst-tsearch.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/misc/tst-tsearch.c b/misc/tst-tsearch.c
index 9a570dd6c9..44895d4c0a 100644
--- a/misc/tst-tsearch.c
+++ b/misc/tst-tsearch.c
@@ -223,8 +223,10 @@ walk_tree (void *root, int expected_count)
size_t first_list_size;
struct walk_trace_element *first_list
= walk_trace_finalize (&walk_trace, &first_list_size);
+ TEST_VERIFY_EXIT (first_list != NULL);
walk_tree_with (root, expected_count, twalk_with_twalk_r);
+ TEST_VERIFY (!walk_trace_has_failed (&walk_trace));
/* Compare the two traces. */
TEST_COMPARE (first_list_size, walk_trace_size (&walk_trace));