Fix Coverity Issue 49/294449/1
authorAnjali Nijhara <a.nijhara@samsung.com>
Mon, 19 Jun 2023 11:23:57 +0000 (16:53 +0530)
committerAnjali Nijhara <a.nijhara@samsung.com>
Mon, 19 Jun 2023 11:23:57 +0000 (16:53 +0530)
This patch fix the below coverity issue:
CID-1668747

Change-Id: Ida334a9c6dc4817ba045f99d4f5d6e4a9cd0a9ca

src/wifi-config.c

index 737a177759f50e7ded73c661659f78438c152a2e..c17234541b0aa0b7a187bc753bcc19f9c2ca0b8e 100755 (executable)
@@ -550,9 +550,10 @@ static gboolean _remove_configuration(const gchar *interface_name, const gchar *
                if (__remove_configuration(dir) != TRUE) {
                        ERR("[%s] is existed, but cannot remove", dir);
                        ret = FALSE;
+               } else {
+                       INFO("Success to remove [%s]", dir);
+                       ret = TRUE;
                }
-               INFO("Success to remove [%s]", dir);
-               ret = TRUE;
        } else {
                ERR("[%s] is not existed", dir);
                ret = FALSE;