Commit 309dca41 authored by Ondřej Surý's avatar Ondřej Surý

tests: Resolve scan-build false positive by adding extra assertion

parent 6bbb0b8e
......@@ -99,6 +99,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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment