]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
tests: Resolve scan-build false positive by adding extra assertion
authorOndřej Surý <ondrej@sury.org>
Sun, 13 Oct 2019 05:02:34 +0000 (07:02 +0200)
committerOndřej Surý <ondrej@sury.org>
Tue, 5 Nov 2019 08:48:51 +0000 (09:48 +0100)
(cherry picked from commit 309dca417cf4784c6453602aadd61bd9dd084878)

bin/tests/system/dlzexternal/driver.c

index 66fc069754595b1f0663641e206eb511dc722993..9c2c49457ca8859bac0c2ca5372c148f00594d31 100644 (file)
@@ -101,6 +101,7 @@ add_name(struct dlz_example_data *state, struct record *list,
        int first_empty = -1;
 
        for (i = 0; i < MAX_RECORDS; i++) {
+               INSIST(list[i].name != NULL);
                if (first_empty == -1 && strlen(list[i].name) == 0U) {
                        first_empty = i;
                }