]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix an error in the qp_test.c unit test
authorAram Sargsyan <aram@isc.org>
Thu, 19 Oct 2023 08:46:58 +0000 (08:46 +0000)
committerAram Sargsyan <aram@isc.org>
Thu, 19 Oct 2023 08:46:58 +0000 (08:46 +0000)
commitb535843bb7cf59b43197e91e8221ecab2a39d779
tree09fa567d0322ab9de4c2af9f6e9ea3181343aa14
parent671e524aef8822f1c15969fa636fab013fccad23
Fix an error in the qp_test.c unit test

In order to check whether there are enough inserted values the
code uses the 'tests' variable (loop counter), which is unreliable,
because the loop sometimes removes an item instead of inserting
one (when the randomly generated item already exists).

Instead of the loop counter, use the existing variable 'inserted',
which should indicate the correct number of the inserted items.
tests/dns/qp_test.c