]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
tests: improved array test
authorMarek Vavruša <marek.vavrusa@nic.cz>
Fri, 5 Jun 2015 15:29:44 +0000 (17:29 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Fri, 5 Jun 2015 15:29:44 +0000 (17:29 +0200)
tests/test_array.c

index 52f35e7cb277e80a42f73b9afabcd80e61c014f8..decac5b2c088205236e4a9d594bea3977dec65c7 100644 (file)
@@ -44,7 +44,7 @@ static void test_array(void **state)
 
        /* Delete elements. */
        array_del(arr, 0);
-       for (size_t i = arr.len; --i;) {
+       while (arr.len > 0) {
                array_pop(arr);
        }