From 847cbb0fc2caf72cd112593f6be3ee8088550a96 Mon Sep 17 00:00:00 2001 From: Vikas Kumar Agrawal Date: Mon, 2 Apr 2018 12:25:06 +0530 Subject: [PATCH] Fix Coverity issue Change-Id: Iff8bc89f8fd54c83f495fa7a6b21b88489293c4a --- src/item.c | 8 -------- src/menu_screen.c | 7 +++++-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/item.c b/src/item.c index a8f8adb..33f6813 100644 --- a/src/item.c +++ b/src/item.c @@ -565,14 +565,6 @@ HAPI void item_update(Evas_Object *item, app_info_t *ai) } if (ai->icon && 0 == access(ai->icon, R_OK)) { - FILE *fp; - fp = fopen(ai->icon, "rb"); - if (fp) { - fseek(fp, 0L, SEEK_END); - _D("Access to file [%s], size[%ld]", ai->icon, ftell(fp)); - fclose(fp); - } else _E("Cannot get the file pointer[%s]", ai->icon); - if (item_is_edje_icon(ai->icon) == MENU_SCREEN_ERROR_OK) { icon = _add_edje_icon(item, ai->icon); evas_object_data_set(item, "icon_image_type", STR_ICON_IMAGE_TYPE_EDJE); diff --git a/src/menu_screen.c b/src/menu_screen.c index dce0a85..47d479f 100644 --- a/src/menu_screen.c +++ b/src/menu_screen.c @@ -519,8 +519,11 @@ static void _language_changed_cb(app_event_info_h event_info, void *data) package = item_get_package(item); if (!package) continue; - app_manager_get_app_info(package, &app_info); - + ret = app_manager_get_app_info(package, &app_info); + if (ret != APP_MANAGER_ERROR_NONE || !app_info) { + _E("Failed to get app info"); + continue; + } ret = app_info_get_label(app_info, &name); if (APP_MANAGER_ERROR_NONE != ret) { _E("Failed to get label from : %s", item_get_package(item)); -- 2.7.4