From: kamaljeet Date: Tue, 19 Feb 2019 04:22:31 +0000 (+0530) Subject: coverity issue fixes for calendar-service X-Git-Tag: accepted/tizen/unified/20190219.154040^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2221ccfa4ef2f7bd58f10896f1a9acc3b01bfbb7;p=platform%2Fcore%2Fpim%2Fcalendar-service.git coverity issue fixes for calendar-service Change-Id: Id07c3b8b2aa9bd6468364471df5481d4c3c26385 Signed-off-by: kamaljeet --- diff --git a/server/cal_server_schema.c b/server/cal_server_schema.c index f5cf586..c3f1733 100644 --- a/server/cal_server_schema.c +++ b/server/cal_server_schema.c @@ -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 */ diff --git a/server/db/cal_db_plugin_instance_localtime.c b/server/db/cal_db_plugin_instance_localtime.c index c2ec67c..0bb320f 100644 --- a/server/db/cal_db_plugin_instance_localtime.c +++ b/server/db/cal_db_plugin_instance_localtime.c @@ -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);