From e694d8795f0627fc5b085a017ba440a85f3f7004 Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Fri, 25 Jan 2013 07:50:32 +0000 Subject: [PATCH] GCC 4.7 build patch Change-Id: Ifada25cdcc09911d4f7b666ba3d92e1568a596d6 --- packaging/com.samsung.data-provider-slave.spec | 2 +- src/lb.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packaging/com.samsung.data-provider-slave.spec b/packaging/com.samsung.data-provider-slave.spec index a289d19..49a7beb 100644 --- a/packaging/com.samsung.data-provider-slave.spec +++ b/packaging/com.samsung.data-provider-slave.spec @@ -1,6 +1,6 @@ Name: com.samsung.data-provider-slave Summary: Slave data provider -Version: 0.9.2 +Version: 0.9.3 Release: 1 Group: main/app License: Flora License diff --git a/src/lb.c b/src/lb.c index 61a33de..4bd77a7 100644 --- a/src/lb.c +++ b/src/lb.c @@ -889,7 +889,6 @@ HAPI int lb_destroy(const char *pkgname, const char *id) Eina_List *l; struct instance *inst; struct item *item; - int ret; inst = so_find_instance(pkgname, id); if (!inst) { @@ -923,7 +922,7 @@ HAPI int lb_destroy(const char *pkgname, const char *id) if (!item->monitor) { free(item); - ret = so_destroy(inst); + (void)so_destroy(inst); } return 0; @@ -1100,7 +1099,6 @@ HAPI int lb_is_pinned_up(const char *pkgname, const char *id) Eina_List *l; struct instance *inst; struct item *item; - int ret; inst = so_find_instance(pkgname, id); if (!inst) { @@ -1115,13 +1113,16 @@ HAPI int lb_is_pinned_up(const char *pkgname, const char *id) } item = eina_list_data_get(l); + if (!item) { + ErrPrint("Invalid item(%s - %s)\n", pkgname, id); + return -EFAULT; + } /*! * NOTE: * item is not used. * Maybe this is not neccessary for this operation */ - ret = so_is_pinned_up(inst); - return ret; + return so_is_pinned_up(inst); } HAPI int lb_change_group(const char *pkgname, const char *id, const char *cluster, const char *category) -- 2.7.4