Fix SVACE & CppTest issues 62/157862/2 submit/tizen/20190712.103649
authorLukasz Stanislawski <lukasz.stanislawski@gmail.com>
Thu, 26 Oct 2017 13:39:15 +0000 (15:39 +0200)
committerLukasz Stanislawski <lukasz.stanislawski@gmail.com>
Thu, 26 Oct 2017 13:46:32 +0000 (15:46 +0200)
Change-Id: I466bee3715b8916f4d8ba0e74a1e20bf53403c17

src/item.c
src/list.c
src/scroller.c

index 2c4bbf9..27fe24b 100644 (file)
@@ -604,7 +604,6 @@ static void _clicked_cb(void *data, Evas_Object *obj, void *event_info)
        ret_if(!appid);
 
        util_launch_app(appid, info->instance_id, info->uri);
-       /* layout_hide_with_timer(); */
 }
 
 
@@ -654,7 +653,7 @@ Evas_Object *item_create(Evas_Object *scroller, list_type_default_s *info)
                                (ELM_ACCESSIBLE_READING_INFO_TYPE_NAME
                                | ELM_ACCESSIBLE_READING_INFO_TYPE_STATE
                                | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION));
-       sprintf(description, format, info->name, info->name);
+       snprintf(description, sizeof(description), format, info->name, info->name);
        elm_atspi_accessible_description_set(focus, description);
 
        evas_object_data_set(item, DATA_KEY_ITEM_INFO, info);
index 7c97afc..475a9a6 100644 (file)
@@ -60,6 +60,8 @@ static list_type_default_s *_pkglist_item_create(app_info_h app_info,
                return NULL;
 
        list_type_default_s *list_item = calloc(1, sizeof(list_type_default_s));
+       if (!list_item)
+               return NULL;
 
        int ret = app_info_get_app_id(app_info, &list_item->appid);
        if (ret != APP_MANAGER_ERROR_NONE) {
@@ -114,6 +116,7 @@ static list_type_default_s *_pkglist_item_create(app_info_h app_info,
                if (list_item->icon == NULL) {
                        _E("Out of memory");
                        _pkglist_unretrieve_item(list_item);
+                       return NULL;
                }
        } else {
                ret = app_info_get_icon(app_info, &list_item->icon);
index a0da21d..342773a 100644 (file)
@@ -278,7 +278,6 @@ Evas_Object *scroller_create(Evas_Object *layout)
 
        elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_FALSE);
        elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
-       /* elm_object_style_set(scroller, "list_effect"); */
        elm_object_focus_allow_set(scroller, EINA_FALSE);
        elm_object_part_content_set(layout, "scroller", scroller);
        evas_object_show(scroller);