Coverity fix: check return type 34/260134/1 accepted/tizen/6.5/unified/20211028.114706 accepted/tizen/unified/20210728.090617 submit/tizen/20210726.065727 submit/tizen_6.5/20211028.162401 tizen_6.5.m2_release
authorAbhimanyu Swami <abhimanyu1.s@samsung.com>
Mon, 21 Jun 2021 05:50:08 +0000 (11:20 +0530)
committerAbhimanyu Swami <abhimanyu1.s@samsung.com>
Mon, 21 Jun 2021 05:50:08 +0000 (11:20 +0530)
Change-Id: I9cabd96cc31484a5868066470a7a4408612f0cdd
Signed-off-by: Abhimanyu Swami <abhimanyu1.s@samsung.com>
server/ctsvc_schema_recovery.c

index 40faf6f..697aad7 100644 (file)
@@ -204,11 +204,14 @@ static void __ctsvc_server_backup_file()
        i = (i + 1) % MAX_BACKUP;
        snprintf(new_path, sizeof(new_path), "%s%d", CTSVC_DB_PATH, i);
        if (0 == access(new_path, F_OK)) {
-               remove(new_path);
+               if (remove(new_path) != 0)
+                       ERR("Unable to remove file");
                snprintf(new_path, sizeof(new_path), "%s%d", CTSVC_DB_SHM_PATH, i);
-               remove(new_path);
+               if (remove(new_path) != 0)
+                       ERR("Unable to remove file");
                snprintf(new_path, sizeof(new_path), "%s%d", CTSVC_DB_WAL_PATH, i);
-               remove(new_path);
+               if (remove(new_path) != 0)
+                       ERR("Unable to remove file");
        }
 }