Remove warning 09/61709/1 accepted/tizen/common/20160323.183816 accepted/tizen/ivi/20160321.114101 accepted/tizen/mobile/20160321.114006 accepted/tizen/tv/20160321.114017 accepted/tizen/wearable/20160321.114036 submit/tizen/20160315.050359 submit/tizen/20160321.052611 submit/tizen_common/20160316.154911
authorHyunho Kang <hhstark.kang@samsung.com>
Thu, 10 Mar 2016 04:19:09 +0000 (13:19 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Thu, 10 Mar 2016 04:19:56 +0000 (13:19 +0900)
Change-Id: I56e9930c71a8322e02df06c57e00243b311982a7
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
src/badge.c
src/badge_internal.c

index 1005e3f..9516d10 100755 (executable)
@@ -109,7 +109,6 @@ int badge_remove(const char *app_id)
 {
        char *caller = NULL;
        int result = BADGE_ERROR_NONE;
-       bool existing = false;
 
        if (app_id == NULL)
                return BADGE_ERROR_INVALID_PARAMETER;
@@ -146,7 +145,6 @@ int badge_set_count(const char *app_id, unsigned int count)
 {
        char *caller = NULL;
        int result = BADGE_ERROR_NONE;
-       bool existing = false;
 
        if (app_id == NULL)
                return BADGE_ERROR_INVALID_PARAMETER;
@@ -181,7 +179,6 @@ int badge_set_display(const char *app_id, unsigned int is_display)
 {
        char *caller = NULL;
        int result = BADGE_ERROR_NONE;
-       bool existing = false;
 
        if (app_id == NULL)
                return BADGE_ERROR_INVALID_PARAMETER;
index 1b5831f..28725bb 100755 (executable)
@@ -312,7 +312,6 @@ int _badge_is_existing(const char *pkgname, bool *existing)
 {
        sqlite3 *db = NULL;
        int sqlret;
-       int ret = BADGE_ERROR_NONE;
        int result = BADGE_ERROR_NONE;
 
        if (!pkgname || !existing) {
@@ -329,18 +328,19 @@ int _badge_is_existing(const char *pkgname, bool *existing)
        }
 
        result = _badge_check_data_inserted(pkgname, db);
-       if (result == BADGE_ERROR_ALREADY_EXIST)
+       if (result == BADGE_ERROR_ALREADY_EXIST) {
                *existing = TRUE;
-       else if (result == BADGE_ERROR_NOT_EXIST)
+               result = BADGE_ERROR_NONE;
+       } else if (result == BADGE_ERROR_NOT_EXIST) {
                *existing = FALSE;
-       else
-               ret = result;
+               result = BADGE_ERROR_NONE;
+       }
 
        sqlret = db_util_close(db);
        if (sqlret != SQLITE_OK)
                WARN("fail to db_util_close - [%d]", sqlret);
 
-       return BADGE_ERROR_NONE;
+       return result;
 }
 
 int _badge_foreach_existed(badge_foreach_cb callback, void *data)