From 11846c7d0025a346ab6fece38e022e6a797f1eee Mon Sep 17 00:00:00 2001 From: David Cermak Date: Tue, 27 Aug 2024 15:20:58 +0200 Subject: [PATCH] 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 --- components/mdns/mdns.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/components/mdns/mdns.c b/components/mdns/mdns.c index 473750bfc..70d424e84 100644 --- a/components/mdns/mdns.c +++ b/components/mdns/mdns.c @@ -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) { ret_index++; } - if (ret_index == 0) { - *txt_count = 0; - *txt_value_len = NULL; - return NULL; - } *txt_count = ret_index; if (ret_index == 0) { // handle empty TXT *txt_value_len = NULL;