From 2221ccfa4ef2f7bd58f10896f1a9acc3b01bfbb7 Mon Sep 17 00:00:00 2001 From: kamaljeet Date: Tue, 19 Feb 2019 09:52:31 +0530 Subject: [PATCH] coverity issue fixes for calendar-service Change-Id: Id07c3b8b2aa9bd6468364471df5481d4c3c26385 Signed-off-by: kamaljeet --- server/cal_server_schema.c | 2 +- server/db/cal_db_plugin_instance_localtime.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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); -- 2.7.4