fix(mdns): Fixed dead-code reported by coverity

Fixes CID 467738: Logically dead code in mdns.c, _copy_mdns_txt_items
Introduced by probably by a merge confilict, as the fix was added in
two separate PRs, merging d4da9cb0 first and 8a690503 later
This commit is contained in:
David Cermak
2024-08-27 15:20:58 +02:00
parent 73c48307a3
commit 11846c7d00

View File

@ -5956,11 +5956,6 @@ static mdns_txt_item_t *_copy_mdns_txt_items(mdns_txt_linked_item_t *items, uint
for (mdns_txt_linked_item_t *tmp = items; tmp != NULL; tmp = tmp->next) { for (mdns_txt_linked_item_t *tmp = items; tmp != NULL; tmp = tmp->next) {
ret_index++; ret_index++;
} }
if (ret_index == 0) {
*txt_count = 0;
*txt_value_len = NULL;
return NULL;
}
*txt_count = ret_index; *txt_count = ret_index;
if (ret_index == 0) { // handle empty TXT if (ret_index == 0) { // handle empty TXT
*txt_value_len = NULL; *txt_value_len = NULL;