coverity issue fixes for calendar-service 80/200080/1 accepted/tizen/unified/20190219.154040 submit/tizen/20190219.050141
authorkamaljeet <kamal.jc@samsung.com>
Tue, 19 Feb 2019 04:22:31 +0000 (09:52 +0530)
committerkamaljeet <kamal.jc@samsung.com>
Tue, 19 Feb 2019 04:22:31 +0000 (09:52 +0530)
Change-Id: Id07c3b8b2aa9bd6468364471df5481d4c3c26385
Signed-off-by: kamaljeet <kamal.jc@samsung.com>
server/cal_server_schema.c
server/db/cal_db_plugin_instance_localtime.c

index f5cf586..c3f1733 100644 (file)
@@ -204,7 +204,7 @@ int cal_server_schema_check(void)
                                ERR("Failed to remove CAL_DB_SHM_FILE");
                        if (remove(CAL_DB_WAL_FILE) != 0)
                                ERR("Failed to remove CAL_DB_WAL_FILE");
-                       if (remove(CAL_DB_FILE))
+                       if (remove(CAL_DB_FILE) !=0)
                                ERR("Failed to remove CAL_DB_FILE");
                        need_to_remove = false;
                /* LCOV_EXCL_STOP */
index c2ec67c..0bb320f 100644 (file)
@@ -191,7 +191,7 @@ static int _cal_db_instance_localtime_get_records_with_query(calendar_query_h qu
 
        /* make: projection */
        ret = cal_db_query_create_projection(query, &projection);
-       if (ret = CALENDAR_ERROR_NONE)
+       if (ret != CALENDAR_ERROR_NONE)
                ERR("cal_db_query_create_projection() Fail(%d) \n", ret);
 
        char *query_str = NULL;
@@ -218,7 +218,7 @@ static int _cal_db_instance_localtime_get_records_with_query(calendar_query_h qu
        /* order */
        char *order = NULL;
        ret = cal_db_query_create_order(query, condition, &order);
-       if (ret = CALENDAR_ERROR_NONE)
+       if (ret != CALENDAR_ERROR_NONE)
                ERR("cal_db_query_create_order() Fail(%d) \n", ret);
        if (order) {
                cal_db_append_string(&query_str, order);