From 11fcb4beb37191d5d6efa7335eaf721dfac39d30 Mon Sep 17 00:00:00 2001 From: suvi-123 Date: Wed, 4 Oct 2023 14:30:13 +0530 Subject: [PATCH] Avoid error log for deleteRootAndMultipartDocs function --- src/webcfg_multipart.c | 7 +------ tests/test_multipart_unittest.c | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/webcfg_multipart.c b/src/webcfg_multipart.c index 58006e6a..6715aa26 100644 --- a/src/webcfg_multipart.c +++ b/src/webcfg_multipart.c @@ -2454,13 +2454,8 @@ WEBCFG_STATUS deleteRootAndMultipartDocs() delete_tmp_list(); delete_multipart(); WebcfgDebug("After free mp\n"); - return WEBCFG_SUCCESS; - } - else - { - WebcfgError("deleteRootAndMultipartDocs failed\n"); - return WEBCFG_FAILURE; } + return WEBCFG_SUCCESS; } void failedDocsRetry() diff --git a/tests/test_multipart_unittest.c b/tests/test_multipart_unittest.c index 4f6dc7bf..06925b17 100644 --- a/tests/test_multipart_unittest.c +++ b/tests/test_multipart_unittest.c @@ -553,7 +553,7 @@ void test_deleteRootAndMultipartDocs_fail(){ tmpData->next = NULL; set_global_tmp_node(tmpData); int m=deleteRootAndMultipartDocs(); - CU_ASSERT_EQUAL(1,m); + CU_ASSERT_EQUAL(0,m); set_global_tmp_node(NULL); set_global_mp(NULL); }