Remove (void) before function calls 00/198000/1
authorKiseok Chang <kiso.chang@samsung.com>
Wed, 2 Jan 2019 07:56:03 +0000 (16:56 +0900)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Thu, 17 Jan 2019 11:46:24 +0000 (12:46 +0100)
Change-Id: I0d32050ed40a4201969b2bdd9845a31f81dbaae2
Signed-off-by: Kiseok Chang <kiso.chang@samsung.com>
25 files changed:
setting-about/src/setting-about-main.c
setting-appmgr/src/setting-appmgr-runinfo.c
setting-appmgr/src/setting-appmgr-utils.c
setting-appmgr/src/setting-appmgr.c
setting-common/src/setting-common-draw-genlist.c [changed mode: 0644->0755]
setting-common/src/setting-common-draw-popup.c
setting-display/src/setting-display-main.c
setting-display/src/setting-display.c [changed mode: 0644->0755]
setting-language-and-input/src/setting-display-language-view.c
setting-locktype/src/setting-locktype-main.c
setting-network/src/setting-network-connection-create.c
setting-network/src/setting-network-main.c
setting-network/src/setting-network-profile-delete.c
setting-network/src/setting-network-service-providers.c
setting-profile-common/src/setting-profile-common.c
setting-profile-common/src/setting-profile-sound-main.c
setting-profile/src/setting-profile.c [changed mode: 0644->0755]
setting-ringtone/src/setting-ringtone-main.c
setting-ringtone/src/setting-ringtone.c
setting-storage/src/setting-storage.c
setting-time/src/setting-time-main.c
smartmanager-battery/src/smartmanager-battery.c
smartmanager-data/src/smartmanager-data-usage-mobile-settings.c
smartmanager-data/src/smartmanager-data.c
smartmanager-data/src/smartmanager-utils.c

index a8ab1681c30b82b87567e4f7f358912e493a1b8a..bd9700a2a14bcc59e75b79920ff7e39c3d3c080c 100644 (file)
@@ -1345,7 +1345,7 @@ static int __generate_genlist(void *data)
                        "IDS_ST_MBODY_LEGAL_INFORMATION_ABB", NULL, NULL);
 
        /*////////////////////////////////////////////////////////////////// */
-       (void)setting_create_Gendial_field_titleItem(ad->md.genlist,
+       setting_create_Gendial_field_titleItem(ad->md.genlist,
                        &(ad->itc_group_item), "IDS_ST_BODY_DEVICE_INFO",
                        NULL);
        /*////////////////////////////////////////////////////////////////// */
@@ -1463,7 +1463,7 @@ static int __generate_genlist(void *data)
        }
 
        /* 7. [UI] Device status: */
-       (void)setting_create_Gendial_field_def(ad->md.genlist,
+       setting_create_Gendial_field_def(ad->md.genlist,
                        &(ad->itc_1icon_1text_sub), __mouse_up_Gendial_list_cb,
                        ad, SWALLOW_Type_INVALID, NULL, NULL, 0,
                        ITEM_NAME_STATUS, "Show phone number, network"\
index 17d77ceec9abbbe2056c04fc182fd88bc347548d..0acf54de71c7780b8a0025d1ea8b941cde60904e 100644 (file)
@@ -313,7 +313,7 @@ static int _get_pkg(SettingAppMgr *ad)
 static void _get_apps_list(SettingAppMgr *ad)
 {
        ret_if(!ad);
-       (void)package_info_foreach_app_from_package(
+       package_info_foreach_app_from_package(
                        ad->selected_running_app.package_info,
                        PACKAGE_INFO_ALLAPP, _app_in_package_info_cb, ad);
 }
@@ -359,14 +359,14 @@ static bool _app_in_package_info_cb(package_info_app_component_type_e comp_type,
                return true;
        }
        sibling_info->id = strdup(app_id);
-       (void)app_info_get_icon(sibling_app_info, &sibling_info->icon);
+       app_info_get_icon(sibling_app_info, &sibling_info->icon);
        if (EINA_TRUE != ecore_file_exists(sibling_info->icon)) {
                free(sibling_info->icon);
                sibling_info->icon = get_application_default_icon(app_id);
        }
 
-       (void)app_info_get_label(sibling_app_info, &sibling_info->label);
-       (void)app_info_get_exec(sibling_app_info, &sibling_info->sub_text);
+       app_info_get_label(sibling_app_info, &sibling_info->label);
+       app_info_get_exec(sibling_app_info, &sibling_info->sub_text);
        sibling_info->ram_usage = get_process_ram_usage_mb(sibling_app_info);
 
        app->apps_in_package = eina_list_append(app->apps_in_package,
index fdced8cd98e13734d2809532ed18a611d1ae1bae..dbc970296a33fcada15849adf7f4bea5efa9af00 100644 (file)
@@ -205,26 +205,26 @@ void appmgr_utils_update_app_node(app_node *node, app_info_h app_info)
        char *label = NULL;
        ret_if(!node);
 
-       (void)app_info_get_app_id(app_info, &node->appid);
-       (void)app_info_get_package(app_info, &node->pkgid);
-       (void)app_info_get_label(app_info, &node->label);
+       app_info_get_app_id(app_info, &node->appid);
+       app_info_get_package(app_info, &node->pkgid);
+       app_info_get_label(app_info, &node->label);
 
        if (!node->label) {
-               (void)app_info_get_exec(app_info, &label);
+               app_info_get_exec(app_info, &label);
                if (label) {
                        node->label = strdup(basename(label));
                        free(label);
                }
        }
 
-       (void)app_info_get_icon(app_info, &node->icon_path);
+       app_info_get_icon(app_info, &node->icon_path);
        if (EINA_TRUE != ecore_file_exists(node->icon_path)) {
                free(node->icon_path);
                node->icon_path = get_application_default_icon(node->appid);
        }
 
-       (void)app_info_is_enabled(app_info, &node->is_enabled);
-       (void)app_manager_is_running(node->appid, &node->is_running);
+       app_info_is_enabled(app_info, &node->is_enabled);
+       app_manager_is_running(node->appid, &node->is_running);
 
        node->ram_used = get_process_ram_usage_mb(app_info);
 }
@@ -294,12 +294,12 @@ void appmgr_utils_update_package_node(package_node *node,
        int ret = 0;
        ret_if(!node);
 
-       (void)package_info_get_package(package_info, &node->pkgid);
-       (void)package_info_get_label(package_info, &node->label);
-       (void)package_info_is_preload_package(package_info,
+       package_info_get_package(package_info, &node->pkgid);
+       package_info_get_label(package_info, &node->label);
+       package_info_is_preload_package(package_info,
                                                &node->is_preloaded);
        /* try to find icon: */
-       (void)package_info_get_icon(package_info, &node->icon_path);
+       package_info_get_icon(package_info, &node->icon_path);
        if (EINA_TRUE != ecore_file_exists(node->icon_path)) {
                free(node->icon_path);
                node->icon_path = NULL;
index 32c64998f07ad674fb2bf24a10e233a7739b965a..3ce97bb9455a80e818119f50b90366192dd4d821 100644 (file)
@@ -330,7 +330,7 @@ static void _app_mgr_ctx_event_cb(app_context_h app_context,
        if (!ad)
                return;
 
-       (void)app_context_get_app_id(app_context, &app_id);
+       app_context_get_app_id(app_context, &app_id);
 
        SETTING_TRACE_DEBUG("_app_mgr_ctx_event_cb: %d app: %s", event, app_id);
 
old mode 100644 (file)
new mode 100755 (executable)
index 2505165..f105db8
@@ -620,7 +620,7 @@ char *__setting_phone_lang_get_by_pattern(const char *locale,
                        / sizeof((bestPattern)[0]));
        int32_t best_pattern_len;
 
-       (void)i18n_udatepg_get_best_pattern(pattern_generator, customSkeleton,
+       i18n_udatepg_get_best_pattern(pattern_generator, customSkeleton,
                        i18n_ustring_get_length(customSkeleton), bestPattern,
                        bestPatternCapacity, &best_pattern_len);
        i18n_ustring_copy_au(bestPatternString, bestPattern);
@@ -632,7 +632,7 @@ char *__setting_phone_lang_get_by_pattern(const char *locale,
        int32_t formattedCapacity = (int32_t)
                        (sizeof(formatted) / sizeof((formatted)[0]));
        int32_t buf_size_needed;
-       (void)i18n_udate_format_date(formatter, date, formatted,
+       i18n_udate_format_date(formatter, date, formatted,
                        formattedCapacity, NULL, &buf_size_needed);
        i18n_ustring_copy_au(formattedString, formatted);
        i18n_udate_destroy(formatter);
index 08261a284f845cfe952df47c30a086483b645a8f..01c5ea7fecbe7790d965d5cc24fb29ba1d5622c9 100644 (file)
@@ -178,7 +178,8 @@ static void _popup_lang_del_cb(void *data, Evas *e, Evas_Object *obj,
 {
        SETTING_TRACE_BEGIN;
        ret_if(!obj);
-       (void)vconf_ignore_key_changed(VCONFKEY_LANGSET, _popup_lang_change_cb);
+
+       vconf_ignore_key_changed(VCONFKEY_LANGSET, _popup_lang_change_cb);
        evas_object_data_set(obj, "title", NULL);
        evas_object_data_set(obj, "text0", NULL);
        evas_object_data_set(obj, "text", NULL);
index ae261e5badfd9e33cade84885d30786996779d20..2186360e0aca636c106cfb9c4326ff0c499b142f 100644 (file)
@@ -547,7 +547,7 @@ static void _get_font_name_string(char *buff, int len_max)
                return;
 
        current_font_type_str = cur_font_get();
-       (void)system_settings_get_value_int(SYSTEM_SETTINGS_KEY_FONT_SIZE,
+       system_settings_get_value_int(SYSTEM_SETTINGS_KEY_FONT_SIZE,
                        &value);
        current_font_size_str = get_font_size_str(value);
        snprintf(buff, NAME_MAX, "%s, %s", _(current_font_size_str),
old mode 100644 (file)
new mode 100755 (executable)
index c202d5c..3d63d24
@@ -91,12 +91,12 @@ static bool _setting_display_app_create(void *data)
        setting_view_node_table_register(&setting_view_display_main, NULL);
        setting_view_create(&setting_view_display_main, display_ad);
 
-       (void)system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_TYPE, _system_setting_changed_cb, data);
-       (void)system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE, _system_setting_changed_cb, data);
-       (void)system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO,
+       system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_TYPE, _system_setting_changed_cb, data);
+       system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE, _system_setting_changed_cb, data);
+       system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO,
                                                                                _system_setting_changed_cb, data);
-       (void)system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME, _system_setting_changed_cb, data);
-       (void)device_add_callback(DEVICE_CALLBACK_BATTERY_LEVEL, _device_changed_cb, data);
+       system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME, _system_setting_changed_cb, data);
+       device_add_callback(DEVICE_CALLBACK_BATTERY_LEVEL, _device_changed_cb, data);
 
        evas_object_show(display_ad->md.window);
 
@@ -109,11 +109,11 @@ static void _setting_display_app_terminate(void *data)
        SettingDisplay *ad = (SettingDisplay *)data;
        setting_retm_if((!data), "!data");
 
-       (void)system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_FONT_TYPE);
-       (void)system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE);
-       (void)system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO);
-       (void)system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME);
-       (void)device_remove_callback(DEVICE_CALLBACK_BATTERY_LEVEL, _device_changed_cb);
+       system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_FONT_TYPE);
+       system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE);
+       system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO);
+       system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME);
+       device_remove_callback(DEVICE_CALLBACK_BATTERY_LEVEL, _device_changed_cb);
 
        setting_view_destroy(&setting_view_display_main, ad);
 
index 06c6aa288d0d836eaa3d05e5295e09f82e0cb5e7..d181ebce807cc553c34d2d320b7639e946ca3351 100644 (file)
@@ -97,7 +97,7 @@ static int __set_dateformat(const char *region,
        bestPatternCapacity = (int32_t)
                        (sizeof(bestPattern) / sizeof((bestPattern)[0]));
        int32_t best_pattern_len;
-       (void)i18n_udatepg_get_best_pattern(ad->pattern_generator, customSkeleton,
+       i18n_udatepg_get_best_pattern(ad->pattern_generator, customSkeleton,
                                i18n_ustring_get_length(customSkeleton), bestPattern,
                                bestPatternCapacity, &best_pattern_len);
 
index 6f21ac5f4c6b0d00ff5c5789b6f376564283970a..8186f9523fbd551c6a4e4a70ed7860c2bb3d3a8b 100644 (file)
@@ -637,7 +637,7 @@ static int _view_destroy(void *cb)
        ad->md.window = NULL;
 
 #if 0
-       (void) vconf_ignore_key_changed(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT,
+       vconf_ignore_key_changed(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT,
                        __lock_type_key_changed_cb);
 #endif
 
index be59be17dc1f830476e29695fae99298dd6dde13..3cccead710ef7c10f6da57eeff499a3a2aec163e 100644 (file)
@@ -1412,46 +1412,46 @@ static int __save_connection(void *data)
                con_info = s_info.sel_profile_h;
        } else {
                if (!safeStrCmp(ad->con_name, STR_SETTING_MMS_CONNECTIONS)) {
-                       (void)connection_profile_create(
+                       connection_profile_create(
                                        CONNECTION_PROFILE_TYPE_CELLULAR,
                                        _(profile_name), &con_info);
-                       (void)connection_profile_set_cellular_service_type(
+                       connection_profile_set_cellular_service_type(
                                        con_info,
                                        CONNECTION_CELLULAR_SERVICE_TYPE_MMS);
                } else if (!safeStrCmp(ad->con_name,
                                "IDS_ST_BODY_INTERNET_CONNECTION")) {
-                       (void)connection_profile_create(
+                       connection_profile_create(
                                        CONNECTION_PROFILE_TYPE_CELLULAR,
                                        _(profile_name), &con_info);
-                       (void)connection_profile_set_cellular_service_type(
+                       connection_profile_set_cellular_service_type(
                                        con_info,
                                        CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET);
                } else {
                        /* need to change con_name */
 
-                       (void)connection_profile_create(
+                       connection_profile_create(
                                        CONNECTION_PROFILE_TYPE_CELLULAR,
                                        _(profile_name), &con_info);
                        if (CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET
                                        == s_info.srvType) {
                                /* Internet */
-                               (void)connection_profile_set_cellular_service_type(
+                               connection_profile_set_cellular_service_type(
                                                con_info,
                                                CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET);
                        } else if (CONNECTION_CELLULAR_SERVICE_TYPE_MMS
                                        == s_info.srvType) {
                                /* MMS */
-                               (void)connection_profile_set_cellular_service_type(
+                               connection_profile_set_cellular_service_type(
                                                con_info,
                                                CONNECTION_CELLULAR_SERVICE_TYPE_MMS);
                        } else { /* MMS + Internet(Together) */
-                               (void)connection_profile_set_cellular_service_type(
+                               connection_profile_set_cellular_service_type(
                                                con_info,
                                                CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET);
-                               (void)connection_profile_create(
+                               connection_profile_create(
                                                CONNECTION_PROFILE_TYPE_CELLULAR,
                                                _(profile_name), &con_info_2);
-                               (void)connection_profile_set_cellular_service_type(
+                               connection_profile_set_cellular_service_type(
                                                con_info_2,
                                                CONNECTION_CELLULAR_SERVICE_TYPE_MMS);
                                SETTING_TRACE("con_info_2:%p", con_info_2);
@@ -1467,9 +1467,9 @@ static int __save_connection(void *data)
        /* save access name */
        SETTING_TRACE("acs_name:%s", acs_name);
 
-       (void)connection_profile_set_cellular_apn(con_info, acs_name);
+       connection_profile_set_cellular_apn(con_info, acs_name);
        if (con_info_2)
-               (void)connection_profile_set_cellular_apn(con_info_2,
+               connection_profile_set_cellular_apn(con_info_2,
                                acs_name);
        FREE(acs_name);
 
@@ -1479,10 +1479,10 @@ static int __save_connection(void *data)
        SETTING_TRACE("-----> radio button state: %d",
                        elm_radio_value_get(s_info.chk_type));
 
-       (void)connection_profile_set_cellular_auth_info(con_info, type,
+       connection_profile_set_cellular_auth_info(con_info, type,
                        usr_name, pwd);
        if (con_info_2)
-               (void)connection_profile_set_cellular_auth_info(con_info_2,
+               connection_profile_set_cellular_auth_info(con_info_2,
                                type, usr_name, pwd);
 
        /* save proxy addr */
@@ -1538,7 +1538,7 @@ static int __save_connection(void *data)
                                                        == s_info.srvType)) {
                home = elm_entry_markup_to_utf8(s_info.data_hm_url->sub_desc);
                if (home == (char *)NULL) {
-                       (void)connection_profile_set_cellular_home_url(
+                       connection_profile_set_cellular_home_url(
                                        con_info, URL_HEAD);
                } else {
                        if (!safeStrCmp(home, "")) {
@@ -1546,7 +1546,7 @@ static int __save_connection(void *data)
                                home = strdup(URL_HEAD);
                                ret = SETTING_DNET_RETURN_NULL_HOMEURL;
                        }
-                       (void)connection_profile_set_cellular_home_url(
+                       connection_profile_set_cellular_home_url(
                                        con_info, home);
                }
                FREE(home);
@@ -1555,7 +1555,7 @@ static int __save_connection(void *data)
        if (con_info_2) { /* creating both internet + MMS */
                home = elm_entry_markup_to_utf8(s_info.data_hm_url->sub_desc);
                if (home == (char *)NULL) {
-                       (void)connection_profile_set_cellular_home_url(
+                       connection_profile_set_cellular_home_url(
                                        con_info_2, URL_HEAD);
                } else {
                        if (!safeStrCmp(home, "")) {
@@ -1563,7 +1563,7 @@ static int __save_connection(void *data)
                                home = strdup(URL_HEAD);
                                ret = SETTING_DNET_RETURN_NULL_HOMEURL;
                        }
-                       (void)connection_profile_set_cellular_home_url(
+                       connection_profile_set_cellular_home_url(
                                        con_info_2, home);
                }
                FREE(home);
@@ -1581,7 +1581,7 @@ static int __save_connection(void *data)
                /* Add a new profile */
                connection_cellular_service_type_e type =
                                CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN;
-               (void)connection_profile_get_cellular_service_type(con_info,
+               connection_profile_get_cellular_service_type(con_info,
                                &type);
 
                err = connection_add_profile(ad->connection, con_info);
@@ -1594,12 +1594,12 @@ static int __save_connection(void *data)
                        return SETTING_DNET_RETURN_ERR;
                }
 
-               (void)connection_profile_destroy(con_info);
+               connection_profile_destroy(con_info);
 
                if (con_info_2) { /* just for MMS + internet */
                        connection_cellular_service_type_e type =
                                        CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN;
-                       (void)connection_profile_get_cellular_service_type(
+                       connection_profile_get_cellular_service_type(
                                        con_info_2, &type);
                        /* Add a new profile */
                        err = connection_add_profile(ad->connection,
@@ -1615,7 +1615,7 @@ static int __save_connection(void *data)
                                                0, false, false, 0);
                                return ret;
                        }
-                       (void)connection_profile_destroy(con_info_2);
+                       connection_profile_destroy(con_info_2);
                }
        } else {
 
index 3d42f1f73da59b03f7620f2d060dbf93934d276f..0c0fe2c5144bb117f7b9a8af569340cdefab6da7 100644 (file)
@@ -1092,9 +1092,7 @@ static void _use_packet_resp_cb(void *data, Evas_Object *obj,
                                        1);
                        if (s_info.popup_chk && elm_check_state_get(
                                        s_info.popup_chk)) {
-                               (void)vconf_set_bool(
-                                               VCONFKEY_SETAPPL_MOBILE_DATA_ON_REMINDER,
-                                               0);
+                               vconf_set_bool(VCONFKEY_SETAPPL_MOBILE_DATA_ON_REMINDER, 0);
                        }
                        _activate_state_data_roaming(ad, true);
 
@@ -1120,9 +1118,7 @@ static void _use_packet_resp_cb(void *data, Evas_Object *obj,
                                        0);
                        if (s_info.popup_chk && elm_check_state_get(
                                        s_info.popup_chk)) {
-                               (void)vconf_set_bool(
-                                               VCONFKEY_SETAPPL_MOBILE_DATA_OFF_REMINDER,
-                                               0);
+                               vconf_set_bool(VCONFKEY_SETAPPL_MOBILE_DATA_OFF_REMINDER, 0);
                        }
                        _activate_state_data_roaming(ad, false);
 
index f7be58470afdde95733110523347252d6d3c7cd6..bfd43f09844eb75557d929ef7c996b7aa5a05214 100644 (file)
@@ -569,7 +569,7 @@ static void setting_network_profile_delete_click_softkey_delete_cb(void *data,
                        ok_cnt++;
                        if (is_default && first_valid_item) {
                                first_profile_h = (connection_profile_h)(first_valid_item->belongs_to);
-                               (void)connection_set_default_cellular_service_profile(
+                               connection_set_default_cellular_service_profile(
                                                ad->connection,
                                                ad->profile_service_type,
                                                first_profile_h);
index 5e3dc9dc32ee6de261f162271587f85b10daf3a8..6521851a0ceab6c6bdd93e87b5f97ed4c38d30e0 100644 (file)
@@ -100,22 +100,22 @@ void select_network_app_control(SettingNetwork *ad)
                        SETTING_TRACE_ERROR("*** [ERR] tel_get_network_serving. ***");
        }
 
-       (void) vconf_notify_key_changed(VCONFKEY_TELEPHONY_NWNAME, __selected_network_change_cb, ad);
-       (void) vconf_notify_key_changed(VCONFKEY_TELEPHONY_SPN_DISP_CONDITION, __selected_network_change_cb, ad);
-       (void) vconf_notify_key_changed(VCONFKEY_TELEPHONY_SPN_NAME, __selected_network_change_cb, ad);
-       (void) vconf_notify_key_changed(VCONFKEY_TELEPHONY_SVCTYPE, __selected_network_change_cb, ad);
-       (void) vconf_notify_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE, __selected_network_change_cb, ad);
+       vconf_notify_key_changed(VCONFKEY_TELEPHONY_NWNAME, __selected_network_change_cb, ad);
+       vconf_notify_key_changed(VCONFKEY_TELEPHONY_SPN_DISP_CONDITION, __selected_network_change_cb, ad);
+       vconf_notify_key_changed(VCONFKEY_TELEPHONY_SPN_NAME, __selected_network_change_cb, ad);
+       vconf_notify_key_changed(VCONFKEY_TELEPHONY_SVCTYPE, __selected_network_change_cb, ad);
+       vconf_notify_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE, __selected_network_change_cb, ad);
        SETTING_TRACE_END;
 }
 
 void select_network_terminate(void)
 {
        SETTING_TRACE_BEGIN;
-       (void) vconf_ignore_key_changed(VCONFKEY_TELEPHONY_NWNAME, __selected_network_change_cb);
-       (void) vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SPN_DISP_CONDITION, __selected_network_change_cb);
-       (void) vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SPN_NAME, __selected_network_change_cb);
-       (void) vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SVCTYPE, __selected_network_change_cb);
-       (void) vconf_ignore_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE, __selected_network_change_cb);
+       vconf_ignore_key_changed(VCONFKEY_TELEPHONY_NWNAME, __selected_network_change_cb);
+       vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SPN_DISP_CONDITION, __selected_network_change_cb);
+       vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SPN_NAME, __selected_network_change_cb);
+       vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SVCTYPE, __selected_network_change_cb);
+       vconf_ignore_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE, __selected_network_change_cb);
 
        FREE(s_info.sel_network);
        SETTING_TRACE_END;
index 52fe10088e2068822b003f40a9da520ba5ea30e3..98d1ee591b50578e089ea21b58291e26a1732c43 100644 (file)
@@ -992,23 +992,23 @@ static int __listen_vconf_change(void *data)
        retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
 
        /*Ints */
-       (void)vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_STATUS,
+       vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_STATUS,
                        __sound_vconf_change_cb, data);
 
        /*Bools */
-       (void)vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL,
+       vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL,
                        __sound_vconf_change_cb, data);
-       (void)vconf_notify_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL,
+       vconf_notify_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL,
                        __sound_vconf_change_cb, data);
 
-       (void)vconf_notify_key_changed(
+       vconf_notify_key_changed(
                        VCONFKEY_SETAPPL_VIBRATE_WHEN_RINGING_BOOL,
                        __sound_vconf_change_cb, data);
-       (void)vconf_notify_key_changed(VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL,
+       vconf_notify_key_changed(VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL,
                        __sound_vconf_change_cb, data);
-       (void)vconf_notify_key_changed(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL,
+       vconf_notify_key_changed(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL,
                        __sound_vconf_change_cb, data);
-       (void)vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL,
+       vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL,
                        __sound_vconf_change_cb, data);
 
        return 0;
@@ -1018,23 +1018,23 @@ static int __unlisten_vconf_change(void *data)
 {
        /* unused listen */
        /*Ints */
-       (void)vconf_ignore_key_changed(VCONFKEY_SYSMAN_MMC_STATUS,
+       vconf_ignore_key_changed(VCONFKEY_SYSMAN_MMC_STATUS,
                        __sound_vconf_change_cb);
 
        /*Bools */
-       (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL,
+       vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL,
                        __sound_vconf_change_cb);
-       (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL,
+       vconf_ignore_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL,
                        __sound_vconf_change_cb);
 
-       (void)vconf_ignore_key_changed(
+       vconf_ignore_key_changed(
                        VCONFKEY_SETAPPL_VIBRATE_WHEN_RINGING_BOOL,
                        __sound_vconf_change_cb);
-       (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL,
+       vconf_ignore_key_changed(VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL,
                        __sound_vconf_change_cb);
-       (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL,
+       vconf_ignore_key_changed(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL,
                        __sound_vconf_change_cb);
-       (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL,
+       vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL,
                        __sound_vconf_change_cb);
 
        return 0;
index f14108245518e8be294c984272f4643acd1b0dab..7761427646c4e199f9a218ad7a222de9a829e91e 100644 (file)
@@ -767,7 +767,7 @@ static void _get_lite_main_list(void *data)
        if (sound_value == FALSE)
                mm_value = 0;
 
-       (void)app_get_id(&app_id);
+       app_get_id(&app_id);
 
        if (app_id && !strcmp(VOLUME_APP_NAME, app_id))
                        optional_txt = "IDS_ST_MBODY_RINGTONE";
@@ -1204,7 +1204,7 @@ static void _result_myfile_cb(app_control_h request,
        if (APP_CONTROL_RESULT_SUCCEEDED != result)
                return;
 
-       (void)app_control_get_extra_data_array(reply, APP_CONTROL_DATA_SELECTED,
+       app_control_get_extra_data_array(reply, APP_CONTROL_DATA_SELECTED,
                        &paths, &arr_len);
        if (!paths || arr_len == 0)
                return;
old mode 100644 (file)
new mode 100755 (executable)
index bb62ebd..a101d5c
@@ -81,7 +81,7 @@ static void _setting_sound_app_resume(void *priv)
                        &sound_value) < 0)
                sound_value = TRUE;
 
-       (void)sound_manager_get_volume(SOUND_TYPE_RINGTONE, &volume);
+       sound_manager_get_volume(SOUND_TYPE_RINGTONE, &volume);
        if (sound_value == FALSE)
                volume = 0;
        if (sound_data->data_call_volume
@@ -91,7 +91,7 @@ static void _setting_sound_app_resume(void *priv)
                                volume);
        }
 
-       (void)sound_manager_get_volume(SOUND_TYPE_NOTIFICATION, &volume);
+       sound_manager_get_volume(SOUND_TYPE_NOTIFICATION, &volume);
        if (sound_value == FALSE)
                volume = 0;
        if (sound_data->data_noti_volume
@@ -101,7 +101,7 @@ static void _setting_sound_app_resume(void *priv)
                                volume);
        }
 
-       (void)sound_manager_get_volume(SOUND_TYPE_MEDIA, &volume);
+       sound_manager_get_volume(SOUND_TYPE_MEDIA, &volume);
        if (sound_data->data_media_volume
                        && sound_data->data_media_volume->eo_check) {
                sound_data->data_media_volume->chk_status = volume;
@@ -109,7 +109,7 @@ static void _setting_sound_app_resume(void *priv)
                                volume);
        }
 
-       (void)sound_manager_get_volume(SOUND_TYPE_SYSTEM, &volume);
+       sound_manager_get_volume(SOUND_TYPE_SYSTEM, &volume);
        if (sound_value == FALSE)
                volume = 0;
        if (sound_data->data_touch_volume
index 4bac57549f786edf3cb72a488324a482a5879859..5caa6d9403a71ad291bc49dd99e7cfe1049ad3fb 100644 (file)
@@ -479,18 +479,18 @@ static void _select_more_menu_add_item_cb(void *data, Evas_Object *ctxpopup,
 
        ret_if(ret != 0 || !music_chooser_handle);
 
-       (void)app_control_set_operation(music_chooser_handle,
+       app_control_set_operation(music_chooser_handle,
                                        APP_CONTROL_OPERATION_PICK);
-       (void)app_control_set_mime(music_chooser_handle, "audio/*");
-       (void)app_control_set_app_id(music_chooser_handle,
+       app_control_set_mime(music_chooser_handle, "audio/*");
+       app_control_set_app_id(music_chooser_handle,
                                        "org.tizen.music-chooser");
-       (void)app_control_add_extra_data(music_chooser_handle,
+       app_control_add_extra_data(music_chooser_handle,
                                        APP_CONTROL_DATA_SELECTION_MODE,
                                        "single");
-       (void)app_control_add_extra_data(music_chooser_handle,
+       app_control_add_extra_data(music_chooser_handle,
                                                APP_CONTROL_DATA_SELECTION_MODE,
                                                "single");
-       (void)app_control_add_extra_data(music_chooser_handle, "request_type",
+       app_control_add_extra_data(music_chooser_handle, "request_type",
                                        "SelectRingtone");
        ret = app_control_send_launch_request(music_chooser_handle,
                                                _music_chooser_appctl_reply_cb,
index 93a4aa9a4e89867af561a4a1f7d49a19a5647dd2..af042775f808f2e9cd1ffa2651d22b9ce03b8f72 100644 (file)
@@ -46,16 +46,16 @@ bool __parse_appctl_request(app_control_h service, void *priv)
                        !app_control_get_caller(service, &caller_id) &&
                        !safeStrCmp("org.tizen.setting-profile", caller_id);
 
-       (void)app_control_get_extra_data(service, "show_notification", &show_notification);
+       app_control_get_extra_data(service, "show_notification", &show_notification);
        ad->show_notification = (show_notification && !safeStrCmp(show_notification, "true"));
        free(show_notification);
        show_notification = NULL;
 
        ad->default_substitution = NULL;
-       (void)app_control_get_extra_data(service, "default_substitution",
+       app_control_get_extra_data(service, "default_substitution",
                                        &ad->default_substitution);
 
-       (void)app_control_get_extra_data_array(service, APP_CONTROL_DATA_SELECTED, &paths, &paths_len);
+       app_control_get_extra_data_array(service, APP_CONTROL_DATA_SELECTED, &paths, &paths_len);
        if (paths_len > 0)
                ad->appctl_file_path = strndup(paths[0], PATH_MAX);
        else
@@ -65,7 +65,7 @@ bool __parse_appctl_request(app_control_h service, void *priv)
 
        paths = NULL;
        paths_len = 0;
-       (void)app_control_get_extra_data_array(service, APP_CONTROL_DATA_PATH, &paths, &paths_len);
+       app_control_get_extra_data_array(service, APP_CONTROL_DATA_PATH, &paths, &paths_len);
        ad->appctl_dir_path = NULL;
        if (paths_len > 0) {
                /* This is the situation when someone has chosen one of
index fbd9e067067401179514337c115983bec1fe60e9..cfd3befe197eaf8dbec4fcd138fcec584e59f994 100644 (file)
@@ -263,7 +263,7 @@ static void _setting_storage_app_on_app_ctl(app_control_h app_control, void *dat
        evas_object_show(ad->md.window);
 
        ad->launched_by_external_app = false;
-       (void)app_control_get_extra_data(app_control, "viewtype", &value);
+       app_control_get_extra_data(app_control, "viewtype", &value);
 
        ad->launch_mode = value;
 
index 955b143b66ba89729171aadcb7a3f7a0f2bfa103..940130b2245c1d1d54196943ce489142a9f5a591 100644 (file)
@@ -1366,7 +1366,7 @@ static void setting_time_main_chk_btn_cb(void *data, Evas_Object *obj,
                setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE,
                                                                 &bvalue, &err);
                if (bvalue) {
-                       (void) setting_set_bool_slp_key(
+                       setting_set_bool_slp_key(
                                        BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE,
                                        SETTING_ON_OFF_BTN_OFF, &err);
                        setting_update_gl_item_chk_status(ad->data_auto, 0);
@@ -1471,10 +1471,8 @@ static void setting_time_main_mouse_up_Gendial_list_cb(
                setting_update_gl_item_chk_status(list_item, !old_status);
                int err = 0;
                if (!list_item->chk_status) {
-                       (void)
-                       setting_set_bool_slp_key
-                       (BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE,
-                        SETTING_ON_OFF_BTN_OFF, &err);
+                       setting_set_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE,
+                                                                                               SETTING_ON_OFF_BTN_OFF, &err);
 
                        if (ad->data_tz)
                                elm_object_item_disabled_set(ad->data_tz->item, EINA_FALSE);
index 8ebf12e028c40ee2666c14503f0745a60032b159..ada746f1cc0b7d5b5fd39641d95f3c7ff3ed6faf 100644 (file)
@@ -93,9 +93,9 @@ static void _smartmgr_battery_app_terminate(void *data)
 static void _smartmgr_battery_app_pause(void *data)
 {
        retm_if(!data, "data=%p is Invalid", data);
-       (void)device_remove_callback(DEVICE_CALLBACK_BATTERY_CAPACITY,
+       device_remove_callback(DEVICE_CALLBACK_BATTERY_CAPACITY,
                                        _battery_changed_cb);
-       (void)device_remove_callback(DEVICE_CALLBACK_BATTERY_CHARGING,
+       device_remove_callback(DEVICE_CALLBACK_BATTERY_CHARGING,
                                        _battery_changed_cb);
 }
 
@@ -105,9 +105,9 @@ static void _smartmgr_battery_app_resume(void *data)
        SmartMgrBattery *ad = data;
        retm_if(NULL == data, "data=%p is Invalid", data);
 
-       (void)device_add_callback(DEVICE_CALLBACK_BATTERY_CAPACITY,
+       device_add_callback(DEVICE_CALLBACK_BATTERY_CAPACITY,
                                _battery_changed_cb, ad);
-       (void)device_add_callback(DEVICE_CALLBACK_BATTERY_CHARGING,
+       device_add_callback(DEVICE_CALLBACK_BATTERY_CHARGING,
                                _battery_changed_cb, ad);
        _get_battery_info(ad);
        _free_battery_usage_details_list(ad);
@@ -196,14 +196,14 @@ static void _get_battery_usage_details_list(SmartMgrBattery *ad)
                        abort();
                }
 
-               (void)context_history_list_get_current(list, &record);
-               (void)context_history_record_get_string(record,
+               context_history_list_get_current(list, &record);
+               context_history_record_get_string(record,
                                        CONTEXT_HISTORY_APP_ID, &app->appid);
-               (void)context_history_record_get_double(record,
+               context_history_record_get_double(record,
                                CONTEXT_HISTORY_TOTAL_AMOUNT, &app->percent);
 
                /* Attribute not available officially: */
-               (void)context_history_record_get_int(record, "UsedTime",
+               context_history_record_get_int(record, "UsedTime",
                                                &app->event_start_time);
                app_info_create(app->appid, &app_info);
                if (app_info) {
@@ -219,10 +219,10 @@ static void _get_battery_usage_details_list(SmartMgrBattery *ad)
                package_manager_get_package_id_by_app_id(app->appid,
                                                        &app->pkgid);
                ad->apps = eina_list_append(ad->apps, app);
-               (void)context_history_record_destroy(record);
+               context_history_record_destroy(record);
                record = NULL;
                app_info = NULL;
-               (void)context_history_list_move_next(list);
+               context_history_list_move_next(list);
        }
 
 cleanup:
index 884ad4f930a385e3ba57ce0f7926f63ee4371bf5..9f029a6fcd354947f74e86c7f062d9004b4982c9 100644 (file)
@@ -325,6 +325,8 @@ static stc_callback_ret_e _get_and_unset_limit_restrictions_cb(
                if (restrictions_res != RESTRICTIONS_OK) {
                        SETTING_TRACE_ERROR(
                                "set_mobile_restriction_rule_parameters() error");
+
+                       stc_restriction_rule_destroy(mobile_rule);
                        free(subscriber_id);
                        return STC_CALLBACK_CONTINUE;
                }
@@ -333,9 +335,13 @@ static stc_callback_ret_e _get_and_unset_limit_restrictions_cb(
                if (STC_ERROR_NONE != ret) {
                        SETTING_TRACE_ERROR("stc_unset_restriction() error: %s",
                                                                                get_error_message(ret));
+                       stc_restriction_rule_destroy(mobile_rule);
                        free(subscriber_id);
                        return STC_CALLBACK_CONTINUE;
                }
+               
+               stc_restriction_rule_destroy(mobile_rule);
+
        }
        free(subscriber_id);
 
index 3f304d44dceaad0932c49af6828cbfb1e093b8c2..dd14adb8d54e3dd8e442032ce8034271b33bae6f 100644 (file)
@@ -655,7 +655,7 @@ static stc_callback_ret_e _get_restrictions_cb(stc_error_e result,
                return STC_CALLBACK_CONTINUE;
        }
 
-       (void)stc_restriction_rule_get_app_id(info, &app_id);
+       stc_restriction_rule_get_app_id(info, &app_id);
        if (!app_id ||
                (strcmp("TOTAL_DATACALL", app_id) && strcmp("TOTAL_WIFI", app_id))) {
                free(app_id);
@@ -664,7 +664,13 @@ static stc_callback_ret_e _get_restrictions_cb(stc_error_e result,
        SETTING_TRACE_DEBUG("Obtaining restrictions for: %s", app_id);
        free(app_id);
 
-       (void)stc_restriction_rule_get_iface_type(info, &iface_type);
+       ret = stc_restriction_rule_get_iface_type(info, &iface_type);
+       if (STC_ERROR_NONE != ret) {
+               SETTING_TRACE_ERROR("stc_restriction_rule_get_iface_type error: %s",
+                                                       get_error_message(ret));
+               return STC_CALLBACK_CONTINUE;
+       }
+
        SETTING_TRACE_DEBUG("Obtained iface: %d", iface_type);
        if (iface_type == STC_IFACE_DATACALL) {
 
index b8a9d984ba2c56ad61b791464818c3cfddc6b2c7..a9dc40914b85c8c13cbdadea96cb34053a29576a 100644 (file)
@@ -191,7 +191,6 @@ static bool _create_stats_list(stc_h stc, stc_iface_type_e iface,
        if (ret != STC_ERROR_NONE) {
                SETTING_TRACE_ERROR("stc_stats_rule_create() error: %s",
                                                        get_error_message(ret));
-               stc_stats_rule_destroy(rule);
                return true;
        }
 
@@ -217,11 +216,10 @@ static bool _create_stats_list(stc_h stc, stc_iface_type_e iface,
        if (ret != STC_ERROR_NONE) {
                SETTING_TRACE_ERROR("stc_get_stats() error: %s",
                                                        get_error_message(ret));
-               if (STC_ERROR_IN_PROGRESS == ret) {
-                       stc_stats_rule_destroy(rule);
-                       return false;
-               }
+
                stc_stats_rule_destroy(rule);
+               if (STC_ERROR_IN_PROGRESS == ret)
+                       return false;
                return true;
        }
 
@@ -248,7 +246,7 @@ static bool _get_total_stats(stc_h stc, stc_iface_type_e iface_type,
        if (ret != STC_ERROR_NONE) {
                SETTING_TRACE_ERROR("stc_stats_rule_set_time_interval() error: %s",
                                                        get_error_message(ret));
-               (void)stc_stats_rule_destroy(rule);
+               stc_stats_rule_destroy(rule);
                return true;
        }
 
@@ -256,7 +254,7 @@ static bool _get_total_stats(stc_h stc, stc_iface_type_e iface_type,
        if (ret != STC_ERROR_NONE) {
                SETTING_TRACE_ERROR("stc_stats_rule_set_iface_type() error: %s",
                                                        get_error_message(ret));
-               (void)stc_stats_rule_destroy(rule);
+               stc_stats_rule_destroy(rule);
                return true;
        }
 
@@ -266,13 +264,13 @@ static bool _get_total_stats(stc_h stc, stc_iface_type_e iface_type,
        if (ret != STC_ERROR_NONE) {
                SETTING_TRACE_ERROR("stc_get_total_stats() error: %s",
                                                get_error_message(ret));
-               (void)stc_stats_rule_destroy(rule);
+               stc_stats_rule_destroy(rule);
                if (STC_ERROR_IN_PROGRESS == ret)
                        return false;
                return true;
        }
 
-       (void)stc_stats_rule_destroy(rule);
+       stc_stats_rule_destroy(rule);
 
        return true;
 }
@@ -318,12 +316,12 @@ static bool _get_restrictions(stc_h stc, stc_iface_type_e iface_type,
        if (STC_ERROR_NONE != ret) {
                SETTING_TRACE_ERROR("SIM stc_foreach_restriction() error: %s",
                                                        get_error_message(ret));
-               (void)stc_restriction_rule_destroy(rule);
+               stc_restriction_rule_destroy(rule);
                if (STC_ERROR_IN_PROGRESS == ret)
                        return false;
                return true;
        }
-       (void)stc_restriction_rule_destroy(rule);
+       stc_restriction_rule_destroy(rule);
 
        return true;
 }
@@ -359,7 +357,7 @@ restrictions_result set_mobile_restriction_rule_parameters(
 
        ret = stc_restriction_rule_set_app_id(rule, "TOTAL_DATACALL");
        if (STC_ERROR_NONE != ret) {
-               (void)stc_restriction_rule_destroy(rule);
+               stc_restriction_rule_destroy(rule);
                SETTING_TRACE_ERROR("stc_restriction_rule_set_app_id() error: %s",
                                                                                        get_error_message(ret));
                return RESTRICTIONS_ERROR;
@@ -367,7 +365,7 @@ restrictions_result set_mobile_restriction_rule_parameters(
 
        ret = stc_restriction_rule_set_iface_type(rule, STC_IFACE_DATACALL);
        if (STC_ERROR_NONE != ret) {
-               (void)stc_restriction_rule_destroy(rule);
+               stc_restriction_rule_destroy(rule);
                SETTING_TRACE_ERROR("stc_restriction_rule_set_iface_type() error: %s",
                                                                                        get_error_message(ret));
                return RESTRICTIONS_ERROR;
@@ -375,7 +373,7 @@ restrictions_result set_mobile_restriction_rule_parameters(
 
        ret = stc_restriction_rule_set_subscriber_id(rule, subscriber_id);
        if (STC_ERROR_NONE != ret) {
-               (void)stc_restriction_rule_destroy(rule);
+               stc_restriction_rule_destroy(rule);
                SETTING_TRACE_ERROR("stc_restriction_rule_set_subscriber_id() error:"\
                                                        "%s", get_error_message(ret));
 
@@ -384,7 +382,7 @@ restrictions_result set_mobile_restriction_rule_parameters(
 
        ret = stc_restriction_rule_set_limit(rule, limit);
        if (STC_ERROR_NONE != ret) {
-               (void)stc_restriction_rule_destroy(rule);
+               stc_restriction_rule_destroy(rule);
                SETTING_TRACE_ERROR("stc_restriction_rule_set_limit() error: %s",
                                                                                        get_error_message(ret));
                return RESTRICTIONS_ERROR;
@@ -392,7 +390,7 @@ restrictions_result set_mobile_restriction_rule_parameters(
 
        ret = stc_restriction_rule_set_warning_limit(rule, warning_limit);
        if (STC_ERROR_NONE != ret) {
-               (void)stc_restriction_rule_destroy(rule);
+               stc_restriction_rule_destroy(rule);
                SETTING_TRACE_ERROR(
                        "stc_restriction_rule_set_warning_limit() error: %s",
                        get_error_message(ret));
@@ -422,18 +420,19 @@ restrictions_result set_mobile_limit_restrictions(stc_h stc_handle,
                                                                                                        warning_limit);
        if (RESTRICTIONS_OK != result) {
                SETTING_TRACE_ERROR("set_restriction_rule_parameters() error");
+               stc_restriction_rule_destroy(rule);
                return result;
        }
 
        ret = stc_set_restriction(stc_handle, rule);
        if (STC_ERROR_NONE != ret) {
-               (void)stc_restriction_rule_destroy(rule);
                SETTING_TRACE_ERROR("stc_set_restriction() error: %s",
                                                                                        get_error_message(ret));
+               stc_restriction_rule_destroy(rule);
                return RESTRICTIONS_ERROR;
        }
 
-       (void)stc_restriction_rule_destroy(rule);
+       stc_restriction_rule_destroy(rule);
        SETTING_TRACE_END;
        return RESTRICTIONS_OK;
 }