diff options
-rw-r--r-- | src/box.c | 4 | ||||
-rw-r--r-- | src/icon.c | 28 | ||||
-rw-r--r-- | src/main.c | 12 | ||||
-rw-r--r-- | src/message.c | 36 | ||||
-rw-r--r-- | src/modules/clock/clock.c | 14 | ||||
-rw-r--r-- | src/modules/connection/dock.c | 4 | ||||
-rw-r--r-- | src/modules/information/alarm.c | 4 | ||||
-rw-r--r-- | src/modules/information/earphone.c | 4 | ||||
-rw-r--r-- | src/modules/information/ext_storage.c | 2 | ||||
-rw-r--r-- | src/modules/information/fm_radio.c | 4 | ||||
-rw-r--r-- | src/modules/information/video_play.c | 6 | ||||
-rw-r--r-- | src/modules/information/voice_recorder.c | 6 | ||||
-rw-r--r-- | src/modules/power/battery.c | 10 | ||||
-rw-r--r-- | src/modules/processing/downloading.c | 6 | ||||
-rw-r--r-- | src/modules/processing/uploading.c | 6 | ||||
-rw-r--r-- | src/modules/setting/bluetooth.c | 12 | ||||
-rw-r--r-- | src/modules/setting/gps.c | 2 | ||||
-rw-r--r-- | src/modules/setting/nfc.c | 6 | ||||
-rw-r--r-- | src/modules/setting/wifi-direct.c | 2 | ||||
-rw-r--r-- | src/ticker.c | 16 | ||||
-rw-r--r-- | src/tts.c | 14 | ||||
-rw-r--r-- | src/util.c | 32 |
22 files changed, 115 insertions, 115 deletions
@@ -80,7 +80,7 @@ static void _update_window(win_info *win) int root_w, root_h; Ecore_X_Window xwin, root; - retif(win == NULL, , "Invalid parameter!"); + retm_if(win == NULL, "Invalid parameter!"); xwin = elm_win_xwindow_get(win->win); if (!xwin) return; @@ -985,7 +985,7 @@ int box_handle_animated_gif(icon_s *icon) display_state_e state; Evas_Object *icon_eo = evas_object_data_get(icon->img_obj.obj, DATA_KEY_IMG_ICON); - retif(icon == NULL, FAIL, "Invalid parameter!"); + retvm_if(icon == NULL, FAIL, "Invalid parameter!"); if (elm_image_animated_available_get(icon_eo) == EINA_FALSE) { return FAIL; @@ -275,7 +275,7 @@ char *icon_label_set(const char *buf, char *font_name, char *font_style, int fon int label_font_size = ICON_FONT_SIZE; Eina_Bool buf_result = EINA_FALSE; - retif(data == NULL || buf == NULL, NULL, "Invalid parameter!"); + retvm_if(data == NULL || buf == NULL, NULL, "Invalid parameter!"); temp_buf = eina_strbuf_new(); if (font_name != NULL) @@ -328,7 +328,7 @@ Eina_Bool icon_add(win_info *win, icon_s *icon) Eina_Bool icon_del(icon_s *icon) { Evas_Object *icon_obj; - retif(icon == NULL, EINA_FALSE, "Invalid parameter!"); + retvm_if(icon == NULL, EINA_FALSE, "Invalid parameter!"); _reset_on_timer_icon_animation(icon); @@ -356,7 +356,7 @@ static int _show_others_in_same_priority(icon_s *icon) { icon_s *wish_add_icon; int area = icon->area; - retif(icon == NULL, FAIL, "Invalid parameter!"); + retvm_if(icon == NULL, FAIL, "Invalid parameter!"); wish_add_icon = list_try_to_find_icon_to_show(icon->area, icon->priority); if (wish_add_icon == NULL) @@ -387,7 +387,7 @@ static int _show_others_in_same_priority(icon_s *icon) static int _hide_others_in_view_list(icon_s *icon) { icon_s *wish_remove_icon = NULL; - retif(icon == NULL, FAIL, "Invalid parameter!"); + retvm_if(icon == NULL, FAIL, "Invalid parameter!"); if (INDICATOR_ICON_AREA_SYSTEM == icon->area || INDICATOR_ICON_AREA_NOTI == icon->area || INDICATOR_ICON_AREA_MINICTRL == icon->area) { @@ -406,19 +406,19 @@ static int _hide_others_in_view_list(icon_s *icon) wish_remove_icon = list_try_to_find_icon_to_remove(INDICATOR_ICON_AREA_NOTI,0); box_unpack(wish_remove_icon); - retif(wish_remove_icon == NULL, FAIL, "Unexpected Error : CAN_ADD_WITH_DEL_NOTI"); + retvm_if(wish_remove_icon == NULL, FAIL, "Unexpected Error : CAN_ADD_WITH_DEL_NOTI"); break; case CAN_ADD_WITH_DEL_SYSTEM: wish_remove_icon = list_try_to_find_icon_to_remove(INDICATOR_ICON_AREA_SYSTEM,0); box_unpack(wish_remove_icon); - retif(wish_remove_icon == NULL, FAIL, "Unexpected Error : CAN_ADD_WITH_DEL_SYSTEM"); + retvm_if(wish_remove_icon == NULL, FAIL, "Unexpected Error : CAN_ADD_WITH_DEL_SYSTEM"); break; case CAN_ADD_WITH_DEL_MINICTRL: wish_remove_icon = list_try_to_find_icon_to_remove(INDICATOR_ICON_AREA_MINICTRL,0); box_unpack(wish_remove_icon); - retif(wish_remove_icon == NULL, FAIL, "Unexpected Error : CAN_ADD_WITH_DEL_MINICTRL"); + retvm_if(wish_remove_icon == NULL, FAIL, "Unexpected Error : CAN_ADD_WITH_DEL_MINICTRL"); break; case CAN_ADD_WITHOUT_DEL: break; @@ -484,7 +484,7 @@ static int _icon_update(icon_s *icon) Evas_Object *img_eo; char buf[PATH_MAX]; - retif(icon == NULL || icon->ad == NULL, FAIL, "Invalid parameter!"); + retvm_if(icon == NULL || icon->ad == NULL, FAIL, "Invalid parameter!"); ad = icon->ad; memset(buf, 0x00, sizeof(buf)); @@ -509,13 +509,13 @@ static int _icon_update(icon_s *icon) util_start_noti_ani(icon); /* Check absolute path */ - retif(icon->img_obj.data == NULL, FAIL,"Invalid parameter!"); + retvm_if(icon->img_obj.data == NULL, FAIL,"Invalid parameter!"); if (strncmp(icon->img_obj.data, "/", 1) != 0) { snprintf(buf, sizeof(buf), "%s/%s", util_get_icon_dir(),icon->img_obj.data); elm_image_file_set(img_eo, buf, NULL); } else { - retif(icon->img_obj.data[0] == '\0', FAIL,"Invalid parameter!"); + retvm_if(icon->img_obj.data[0] == '\0', FAIL,"Invalid parameter!"); elm_image_file_set(img_eo, icon->img_obj.data, NULL); } @@ -573,7 +573,7 @@ void icon_hide(icon_s *icon) { int ret; - retif(icon == NULL, , "Invalid parameter!"); + retm_if(icon == NULL, "Invalid parameter!"); struct appdata *ad = (struct appdata *)icon->ad; icon->wish_to_show = EINA_FALSE; @@ -598,7 +598,7 @@ void icon_event_count_set(int count, void *data) static int _cnt = -1; char buf[1024]; - retif(data == NULL, , "Cannot get layout!"); + retm_if(data == NULL, "Cannot get layout!"); if (_cnt != count) { memset(buf, 0x00, sizeof(buf)); @@ -749,7 +749,7 @@ static void _show_hide_more_noti(win_info* win, bool show) void icon_handle_more_notify_icon(win_info* win) { - retif(win == NULL, , "Invalid parameter!"); + retm_if(win == NULL, "Invalid parameter!"); _D("icon_handle_more_notify_icon called !!"); /* int system_cnt = box_get_count(SYSTEM_LIST); int minictrl_cnt = box_get_count(MINICTRL_LIST); @@ -778,7 +778,7 @@ void* icon_util_make(void* input) { icon_s *icon = (icon_s *)input; - retif(input == NULL,NULL, "Invalid parameter!"); + retvm_if(input == NULL, NULL, "Invalid parameter!"); icon_s *obj = NULL; obj = calloc(1, sizeof(icon_s)); @@ -242,7 +242,7 @@ static void _change_opacity(void *data, enum indicator_opacity_mode mode) { struct appdata *ad = NULL; const char *signal = NULL; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); ad = data; @@ -864,7 +864,7 @@ static void _indicator_mouse_down_cb(void *data, Evas * e, Evas_Object * obj, vo win_info *win = (win_info*)data; Evas_Event_Mouse_Down *ev = NULL; - retif(data == NULL || event == NULL, , "Invalid parameter!"); + retm_if(data == NULL || event == NULL, "Invalid parameter!"); ev = event; win->mouse_event.x = ev->canvas.x; @@ -915,7 +915,7 @@ static void _indicator_mouse_move_cb(void *data, Evas * e, Evas_Object * obj, vo Evas_Event_Mouse_Move *ev = NULL; win_info* win = (win_info*)data; - retif(data == NULL || event == NULL, , "Invalid parameter!"); + retm_if(data == NULL || event == NULL, "Invalid parameter!"); ev = event; @@ -937,7 +937,7 @@ static void _indicator_mouse_up_cb(void *data, Evas * e, Evas_Object * obj, void Evas_Event_Mouse_Up *ev = NULL; win_info *win = (win_info *)data; - retif(data == NULL || event == NULL, , "Invalid parameter!"); + retm_if(data == NULL || event == NULL, "Invalid parameter!"); ev = event; @@ -1000,7 +1000,7 @@ static void _indicator_mouse_up_cb(void *data, Evas * e, Evas_Object * obj, void #if 0 static void _app_terminate_cb(app_context_h app_context, app_context_status_e status, void *data) { - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); _D("_app_terminate_cb"); char *app_id = NULL; app_context_get_app_id(app_context, &app_id); @@ -1031,7 +1031,7 @@ static void _app_terminate_cb(app_context_h app_context, app_context_status_e st static void register_app_terminate_cb(void* data) { - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); app_manager_set_app_context_status_cb(_app_terminate_cb, MP_APP_ID, data); app_manager_set_app_context_status_cb(_app_terminate_cb, FMRADIO_APP_ID, data); app_manager_set_app_context_status_cb(_app_terminate_cb, VR_APP_ID, data); diff --git a/src/message.c b/src/message.c index 195eb22..b02e9a7 100644 --- a/src/message.c +++ b/src/message.c @@ -66,7 +66,7 @@ static MsgBuf msg_queue[QUEUE_SIZE]; static Eina_Bool _ani_temp_timeout_cb(void *data) { - retif(data == NULL, ECORE_CALLBACK_CANCEL, "Invalid parameter!"); + retvm_if(data == NULL, ECORE_CALLBACK_CANCEL, "Invalid parameter!"); if (ani_temp_timer) { @@ -81,7 +81,7 @@ static Eina_Bool _ani_temp_timeout_cb(void *data) void start_temp_ani_timer(void* data) { - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); win_info* win = (win_info*)data; if(ani_temp_timer != NULL) @@ -97,7 +97,7 @@ void start_temp_ani_timer(void* data) static void _hide_message(void* data) { - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); win_info* win = NULL; win = (win_info*)data; @@ -111,7 +111,7 @@ static void _hide_message(void* data) static void _hide_message_all(void* data) { - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); util_signal_emit(data,"message.line2.hide.noeffect","indicator.prog"); } @@ -120,7 +120,7 @@ static void _hide_message_all(void* data) static void _show_message(void* data) { - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); win_info* win = NULL; win = (win_info*)data; struct appdata* ad = (struct appdata*)win->data; @@ -142,7 +142,7 @@ static void _show_message(void* data) static void _show_message_line2(void* data) { - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); win_info* win = NULL; win = (win_info*)data; @@ -156,7 +156,7 @@ static void _show_message_line2(void* data) static Eina_Bool _msg_timeout_cb(void *data) { - retif(data == NULL, ECORE_CALLBACK_CANCEL, "Invalid parameter!"); + retvm_if(data == NULL, ECORE_CALLBACK_CANCEL, "Invalid parameter!"); win_info* win = (win_info*)data; @@ -191,7 +191,7 @@ static Eina_Bool _msg_timeout_cb(void *data) static Eina_Bool _retry_timeout_cb(void *data) { - retif(data == NULL, EINA_TRUE , "Invalid parameter!"); + retvm_if(data == NULL, EINA_TRUE, "Invalid parameter!"); if(message_buf!=NULL) { @@ -215,8 +215,8 @@ static int __get_block_width(void* data, const char* part) Evas_Object * eo = NULL; int geo_dx = 0; int geo_dy = 0; - retif(data == NULL,-1, "Invalid parameter!"); - retif(part == NULL,-1, "Invalid parameter!"); + retvm_if(data == NULL,-1, "Invalid parameter!"); + retvm_if(part == NULL,-1, "Invalid parameter!"); win_info* win = (win_info*)data; @@ -234,8 +234,8 @@ static int __get_string_width(void* data, const char* part) Evas_Object * eo = NULL; int text_dx = 0; int text_dy = 0; - retif(data == NULL,-1, "Invalid parameter!"); - retif(part == NULL,-1, "Invalid parameter!"); + retvm_if(data == NULL,-1, "Invalid parameter!"); + retvm_if(part == NULL,-1, "Invalid parameter!"); win_info* win = (win_info*)data; @@ -250,9 +250,9 @@ static int __get_string_width(void* data, const char* part) static void __handle_2line(win_info* win,char* origin, char* part1, char* part2) { - retif(origin == NULL, , "Invalid parameter!"); - retif(part1 == NULL, , "Invalid parameter!"); - retif(part2 == NULL, , "Invalid parameter!"); + retm_if(origin == NULL, "Invalid parameter!"); + retm_if(part1 == NULL, "Invalid parameter!"); + retm_if(part2 == NULL, "Invalid parameter!"); int index = 0; Eina_Unicode *uni_out = NULL; Eina_Unicode buf[STR_BUF_SIZE] = {0,}; @@ -401,8 +401,8 @@ static void _handle_message_by_win(char *message, void *data) char *text = NULL; double time_clk = 0; char* temp = NULL; - retif(message == NULL, , "Invalid parameter!"); - retif(data == NULL, , "Invalid parameter!"); + retm_if(message == NULL, "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); win = data; @@ -551,7 +551,7 @@ static void _buf_timeout_callback(void* data) static void __buffer_msg_callback(const char *message, void *data) { struct appdata *ad = NULL; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); ad = data; win_info *win = NULL; diff --git a/src/modules/clock/clock.c b/src/modules/clock/clock.c index 7398433..7164598 100644 --- a/src/modules/clock/clock.c +++ b/src/modules/clock/clock.c @@ -367,7 +367,7 @@ static int register_clock_module(void *data) int ret = -1; int i; - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); set_app_state(data); @@ -428,8 +428,8 @@ void indicator_get_apm_by_region(char* output,void *data) { int ret = -1; char *locale = NULL; - retif(data == NULL, , "Data parameter is NULL"); - retif(output == NULL, , "output parameter is NULL"); + retm_if(data == NULL, "Data parameter is NULL"); + retm_if(output == NULL, "output parameter is NULL"); i18n_uchar u_custom_skeleton[CLOCK_STR_LEN] = { 0, }; i18n_uchar u_timezone[64] = {0,}; @@ -532,8 +532,8 @@ void indicator_get_time_by_region(char* output,void *data) { int ret = -1; char *locale; - retif(data == NULL, , "Data parameter is NULL"); - retif(output == NULL, , "output parameter is NULL"); + retm_if(data == NULL, "Data parameter is NULL"); + retm_if(output == NULL, "output parameter is NULL"); i18n_uchar u_custom_skeleton[CLOCK_STR_LEN] = { 0, }; i18n_uchar u_timezone[64] = {0,}; @@ -706,7 +706,7 @@ static char *_access_info_cb(void *data, Evas_Object *obj) time_t ctime; int len; - retif(data == NULL,NULL, "Invalid parameter!"); + retvm_if(data == NULL, NULL, "Invalid parameter!"); char *timezone = util_get_timezone_str(); ICU_set_timezone(timezone); if(timezone!=NULL) @@ -792,7 +792,7 @@ static int register_clock_tts(void *data,int win_type) { int r = 0, ret = -1; - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); Evas_Object *to = NULL; Evas_Object *ao = NULL; diff --git a/src/modules/connection/dock.c b/src/modules/connection/dock.c index 9ef8734..6712e10 100644 --- a/src/modules/connection/dock.c +++ b/src/modules/connection/dock.c @@ -93,7 +93,7 @@ static void indicator_dock_change_cb(keynode_t *node, void *data) int status; int ret; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); /* First, check dock status */ ret = vconf_get_int(VCONFKEY_SYSMAN_CRADLE_STATUS, &status); @@ -117,7 +117,7 @@ static int register_dock_module(void *data) { int r = 0, ret = -1; - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); set_app_state(data); diff --git a/src/modules/information/alarm.c b/src/modules/information/alarm.c index 4f35ba7..e37b74b 100644 --- a/src/modules/information/alarm.c +++ b/src/modules/information/alarm.c @@ -99,7 +99,7 @@ static void indicator_alarm_change_cb(keynode_t *node, void *data) int status = 0; int ret; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); ret = vconf_get_int(VCONFKEY_ALARM_STATE, &status); if (ret == OK) { @@ -145,7 +145,7 @@ static int register_alarm_module(void *data) { int ret = -1; - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); set_app_state(data); if (ret < 0) diff --git a/src/modules/information/earphone.c b/src/modules/information/earphone.c index a06287e..473b83a 100644 --- a/src/modules/information/earphone.c +++ b/src/modules/information/earphone.c @@ -88,7 +88,7 @@ void check_jack_port(void *data) bool is_tv_out_connected; int ret; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); if(icon_get_update_flag()==0) { updated_while_lcd_off = 1; @@ -127,7 +127,7 @@ static int register_earphone_module(void *data) { int ret; - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); set_app_state(data); diff --git a/src/modules/information/ext_storage.c b/src/modules/information/ext_storage.c index 99546d0..435d526 100644 --- a/src/modules/information/ext_storage.c +++ b/src/modules/information/ext_storage.c @@ -167,7 +167,7 @@ static bool _storage_register_cb(int storage_id, storage_type_e type, storage_st static int register_ext_storage_module(void *data) { int ret; - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); set_app_state(data); diff --git a/src/modules/information/fm_radio.c b/src/modules/information/fm_radio.c index 82c60e9..1944fdf 100644 --- a/src/modules/information/fm_radio.c +++ b/src/modules/information/fm_radio.c @@ -82,7 +82,7 @@ static void indicator_fm_radio_change_cb(void *data) int ret = -1; _D("indicator_fm_radio_change_cb called!"); - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); if (ret == OK) { _D("FM_RADIO state: %d", status); @@ -112,7 +112,7 @@ static int register_fm_radio_module(void *data) int ret = -1; _D("register_fm_radio_module called!"); - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); set_app_state(data); diff --git a/src/modules/information/video_play.c b/src/modules/information/video_play.c index 7d1d5ea..4aad216 100644 --- a/src/modules/information/video_play.c +++ b/src/modules/information/video_play.c @@ -88,7 +88,7 @@ static void show_video_icon(void *data) int status; int ret; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); if (icon_get_update_flag() == 0) { @@ -111,7 +111,7 @@ static void show_video_icon(void *data) static void indicator_video_play_change_cb(keynode_t *node, void *data) { - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); show_video_icon(data); @@ -136,7 +136,7 @@ static int wake_up_cb(void *data) static int register_video_play_module(void *data) { - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); set_app_state(data); diff --git a/src/modules/information/voice_recorder.c b/src/modules/information/voice_recorder.c index 6b2d13c..5088297 100644 --- a/src/modules/information/voice_recorder.c +++ b/src/modules/information/voice_recorder.c @@ -115,7 +115,7 @@ static void hide_image_icon(void) static void show_voicerecoder_icon(void *data) { - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); if(icon_get_update_flag() == 0) { updated_while_lcd_off = 1; @@ -148,7 +148,7 @@ static void show_voicerecoder_icon(void *data) #if 0 static void indicator_voice_recorder_change_cb(keynode_t *node, void *data) { - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); show_voicerecoder_icon(data); return; @@ -180,7 +180,7 @@ void hide_voice_recorder_icon(void) static int register_voice_recorder_module(void *data) { - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); set_app_state(data); show_voicerecoder_icon(data); diff --git a/src/modules/power/battery.c b/src/modules/power/battery.c index d092c5b..2c7c023 100644 --- a/src/modules/power/battery.c +++ b/src/modules/power/battery.c @@ -509,7 +509,7 @@ static void indicator_battery_level_init(void) static Eina_Bool indicator_battery_charging_ani_cb(void *data) { - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); if (_level.current_level == _level.max_level) { aniIndex = _level.max_level; @@ -532,7 +532,7 @@ static Eina_Bool indicator_battery_charging_ani_cb(void *data) static int indicator_change_battery_image_level(void *data, int level) { - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); if(is_battery_percentage_shown) { @@ -588,7 +588,7 @@ static void indicator_battery_update_display(void *data) int ret; int level = 0; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); if(icon_get_update_flag()==0) { @@ -679,7 +679,7 @@ static void indicator_battery_pm_state_change_cb(device_callback_e type, void *v { display_state_e display_state; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); display_state = device_display_get_state(&display_state); @@ -717,7 +717,7 @@ static int register_battery_module(void *data) int r = 0; int ret = -1; - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); /* DO NOT change order of below fuctions */ set_app_state(data); diff --git a/src/modules/processing/downloading.c b/src/modules/processing/downloading.c index 8299cf3..a021f8d 100644 --- a/src/modules/processing/downloading.c +++ b/src/modules/processing/downloading.c @@ -120,7 +120,7 @@ static void indicator_downloading_change_cb(keynode_t *node, void *data) /*int status = 0;*/ int result = 0; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); if(icon_get_update_flag()==0) { @@ -148,7 +148,7 @@ static void indicator_downloading_pm_state_change_cb(keynode_t *node, void *data { int status = 0; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); if (vconf_get_int(VCONFKEY_PM_STATE, &status) < 0) { @@ -187,7 +187,7 @@ static int register_downloading_module(void *data) { int ret = 0; - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); set_app_state(data); diff --git a/src/modules/processing/uploading.c b/src/modules/processing/uploading.c index f0351a2..1c64a3b 100644 --- a/src/modules/processing/uploading.c +++ b/src/modules/processing/uploading.c @@ -120,7 +120,7 @@ static void indicator_uploading_change_cb(keynode_t *node, void *data) /*int status = 0;*/ int result = 0; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); if(icon_get_update_flag()==0) { @@ -148,7 +148,7 @@ static void indicator_uploading_pm_state_change_cb(keynode_t *node, void *data) { int status = 0; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); vconf_get_int(VCONFKEY_PM_STATE, &status); @@ -176,7 +176,7 @@ static int register_uploading_module(void *data) { int ret = 0; - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); set_app_state(data); diff --git a/src/modules/setting/bluetooth.c b/src/modules/setting/bluetooth.c index 8d0770a..1b52b68 100644 --- a/src/modules/setting/bluetooth.c +++ b/src/modules/setting/bluetooth.c @@ -160,7 +160,7 @@ static bool _bt_cb(bt_device_info_s *device_info, void *user_data) { // For every paired device check if it's connected with any profile int ret = bt_device_foreach_connected_profiles(device_info->remote_address, _connected_cb, user_data); - retif(ret != BT_ERROR_NONE, true, "bt_device_foreach_connected_profiles failed[%d]", ret); + retvm_if(ret != BT_ERROR_NONE, true, "bt_device_foreach_connected_profiles failed[%d]", ret); return true; } @@ -172,7 +172,7 @@ static void indicator_bluetooth_change_cb(bool connected, bt_device_connection_i int result = NO_DEVICE; bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); if (icon_get_update_flag() == 0) { updated_while_lcd_off = 1; @@ -181,14 +181,14 @@ static void indicator_bluetooth_change_cb(bool connected, bt_device_connection_i updated_while_lcd_off = 0; ret = bt_adapter_get_state(&adapter_state); - retif(ret != BT_ERROR_NONE, , "bt_adapter_get_state failed"); + retm_if(ret != BT_ERROR_NONE, "bt_adapter_get_state failed"); if (adapter_state != BT_ADAPTER_ENABLED) { // If adapter_state is NULL. hide_image_icon(). _D("BT is not enabled. So don't need to update BT icon."); return; } ret = bt_adapter_foreach_bonded_device(_bt_cb, (void *)&result); - retif(ret != BT_ERROR_NONE, , "bt_adapter_foreach_bonded_device failed"); + retm_if(ret != BT_ERROR_NONE, "bt_adapter_foreach_bonded_device failed"); show_bluetooth_icon(data, result); return; @@ -234,7 +234,7 @@ static int register_bluetooth_module(void *data) int r = 0, ret = -1; bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED; - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); set_app_state(data); @@ -249,7 +249,7 @@ static int register_bluetooth_module(void *data) r = -1; ret = bt_adapter_get_state(&adapter_state); - retif(ret != BT_ERROR_NONE, -1, "bt_adapter_get_state failed"); + retvm_if(ret != BT_ERROR_NONE, -1, "bt_adapter_get_state failed"); indicator_bluetooth_change_cb(false, NULL, data); indicator_bluetooth_adapter_state_changed_cb(0, adapter_state, data); diff --git a/src/modules/setting/gps.c b/src/modules/setting/gps.c index 6a3adc4..5a3040c 100644 --- a/src/modules/setting/gps.c +++ b/src/modules/setting/gps.c @@ -212,7 +212,7 @@ static int register_gps_module(void *data) { int ret; - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); set_app_state(data); diff --git a/src/modules/setting/nfc.c b/src/modules/setting/nfc.c index 6af82bc..d5cef29 100644 --- a/src/modules/setting/nfc.c +++ b/src/modules/setting/nfc.c @@ -95,7 +95,7 @@ static void hide_image_icon(void) static void indicator_nfc_change_cb(bool activated, void *data) { - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); if(icon_get_update_flag()==0) { updated_while_lcd_off = 1; @@ -136,12 +136,12 @@ static int register_nfc_module(void *data) int ret; bool status; - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); set_app_state(data); ret = nfc_manager_set_activation_changed_cb(indicator_nfc_change_cb, data); - retif(ret != NFC_ERROR_NONE, FAIL, "Failed to register callback!"); + retvm_if(ret != NFC_ERROR_NONE, FAIL, "Failed to register callback!"); status = nfc_manager_is_activated(); ret = get_last_result(); diff --git a/src/modules/setting/wifi-direct.c b/src/modules/setting/wifi-direct.c index 2d943fb..00336fe 100644 --- a/src/modules/setting/wifi-direct.c +++ b/src/modules/setting/wifi-direct.c @@ -175,7 +175,7 @@ static int register_wifi_direct_module(void *data) { int ret; - retif(data == NULL, FAIL, "Invalid parameter!"); + retvm_if(data == NULL, FAIL, "Invalid parameter!"); set_app_state(data); diff --git a/src/ticker.c b/src/ticker.c index d4f9985..ef07c55 100644 --- a/src/ticker.c +++ b/src/ticker.c @@ -282,7 +282,7 @@ static char *_get_pkginfo_icon(const char *pkgid) char *icon_path = NULL; app_info_h app_info; - retif(pkgid == NULL, NULL, "invalid parameter"); + retvm_if(pkgid == NULL, NULL, "invalid parameter"); ret = app_info_create(pkgid, &app_info); if (ret != APP_MANAGER_ERROR_NONE) { @@ -309,7 +309,7 @@ static Evas_Object *_ticker_create_icon(Evas_Object *parent, notification_h noti char *icon_default = NULL; Evas_Object *icon = NULL; - retif(noti == NULL || parent == NULL, NULL, "Invalid parameter!"); + retvm_if(noti == NULL || parent == NULL, NULL, "Invalid parameter!"); notification_get_pkgname(noti, &pkgname); if (NOTIFICATION_ERROR_NONE != notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, &icon_path)) { @@ -365,7 +365,7 @@ static inline void _strbuf_add(Eina_Strbuf *str_buf, char *text, const char *del static int _is_phone_number(const char *address) { int digit_count = 0; - retif(address == NULL, 0, "address is NULL"); + retvm_if(address == NULL, 0, "address is NULL"); int addr_len = 0; addr_len = strlen(address); @@ -419,8 +419,8 @@ static void _char_set(char *dst, char s, int index, int size) static void _make_phone_number_tts(char *dst, const char *src, int size) { - retif(dst == NULL, , "invalid argument"); - retif(src == NULL, , "invalid argument"); + retm_if(dst == NULL, "invalid argument"); + retm_if(src == NULL, "invalid argument"); int no_op = 0; int i = 0, j = 0, text_len = 0; @@ -489,7 +489,7 @@ static char *_ticker_get_label_layout_default(notification_h noti, int is_screen Eina_Strbuf *line2 = NULL; char buf[TICKER_MSG_LEN] = { 0, }; - retif(noti == NULL, NULL, "Invalid parameter!"); + retvm_if(noti == NULL, NULL, "Invalid parameter!"); notification_get_text_domain(noti, &domain, &dir); if (domain != NULL && dir != NULL) { @@ -642,7 +642,7 @@ static char *_ticker_get_label_layout_single(notification_h noti, int is_screenr const char *tmp = NULL; char buf[TICKER_MSG_LEN] = { 0, }; - retif(noti == NULL, NULL, "Invalid parameter!"); + retvm_if(noti == NULL, NULL, "Invalid parameter!"); notification_get_text_domain(noti, &domain, &dir); if (domain != NULL && dir != NULL) @@ -763,7 +763,7 @@ static char *_ticker_get_text(notification_h noti, int is_screenreader, char **l char *result = NULL; notification_ly_type_e layout; - retif(noti == NULL, NULL, "Invalid parameter!"); + retvm_if(noti == NULL, NULL, "Invalid parameter!"); notification_get_layout(noti, &layout); @@ -51,10 +51,10 @@ typedef struct _QP_TTS { static QP_TTS_T * _tts_entry_new(int id, char *message) { QP_TTS_T *entry = NULL; - retif(message == NULL, NULL, "NULL message"); + retvm_if(message == NULL, NULL, "NULL message"); entry = (QP_TTS_T *)calloc(1, sizeof(QP_TTS_T)); - retif(entry == NULL, NULL, "failed to memory allocation"); + retvm_if(entry == NULL, NULL, "failed to memory allocation"); entry->id = id; entry->message = strdup(message); @@ -66,7 +66,7 @@ static QP_TTS_T * _tts_entry_new(int id, char *message) static void _tts_entry_del(QP_TTS_T *entry) { - retif(entry == NULL, ,"invalid parameter"); + retm_if(entry == NULL,"invalid parameter"); if (entry->message != NULL) { free(entry->message); @@ -86,7 +86,7 @@ static QP_TTS_T *_tts_list_get_first(void) static void _tts_list_add(QP_TTS_T *entry) { - retif(entry == NULL, ,"invalid parameter"); + retm_if(entry == NULL, "invalid parameter"); s_info.list = eina_list_prepend(s_info.list, entry); } @@ -95,7 +95,7 @@ static void _tts_list_add(QP_TTS_T *entry) static void _tts_list_del(QP_TTS_T *entry) { - retif(entry == NULL, ,"invalid parameter"); + retm_if(entry == NULL, "invalid parameter"); s_info.list = eina_list_remove(s_info.list, entry); } @@ -119,7 +119,7 @@ static int _is_screenreader_on(void) int ret = -1, status = 0; ret = vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &status); - retif(ret != 0, 0, "failed to read VCONFKEY_SETAPPL_ACCESSIBILITY_TTS %d", ret); + retvm_if(ret != 0, 0, "failed to read VCONFKEY_SETAPPL_ACCESSIBILITY_TTS %d", ret); return status; } @@ -349,7 +349,7 @@ void indicator_service_tts_fini(void *data) { void indicator_service_tts_play(char *message) { tts_state_e state = 0; QP_TTS_T *entry = NULL; - retif(message == NULL, ,"invalid parameter"); + retm_if(message == NULL, "invalid parameter"); if (_is_screenreader_on() == 1) { _tts_init(); @@ -67,7 +67,7 @@ char *util_set_label_text_color(const char *txt) Eina_Bool buf_result = EINA_FALSE; char *ret_str = NULL; - retif(txt == NULL, NULL, "Invalid parameter!"); + retvm_if(txt == NULL, NULL, "Invalid parameter!"); temp_buf = eina_strbuf_new(); buf_result = eina_strbuf_append_printf(temp_buf, @@ -108,10 +108,10 @@ void util_signal_emit(void* data, const char *emission, const char *source) void util_part_text_emit(void* data, const char *part, const char *text) { struct appdata *ad = (struct appdata *)data; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); Evas_Object *edje; - retif(ad->win.layout == NULL, , "Invalid parameter!"); + retm_if(ad->win.layout == NULL, "Invalid parameter!"); edje = elm_layout_edje_get(ad->win.layout); edje_object_part_text_set(edje, part, text); } @@ -139,10 +139,10 @@ void util_signal_emit_by_win(void* data, const char *emission, const char *sourc void util_part_text_emit_by_win(void* data, const char *part, const char *text) { win_info *win = (win_info*)data; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); Evas_Object *edje; - retif(win->layout == NULL, , "Invalid parameter!"); + retm_if(win->layout == NULL, "Invalid parameter!"); edje = elm_layout_edje_get(win->layout); edje_object_part_text_set(edje, part, text); } @@ -152,14 +152,14 @@ void util_part_text_emit_by_win(void* data, const char *part, const char *text) void util_battery_percentage_part_content_set(void* data, const char *part, const char *img_path) { struct appdata *ad = (struct appdata *)data; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); Evas_Object *icon = NULL; char path[PATH_MAX]; - retif(ad->win.layout == NULL, , "Invalid parameter!"); + retm_if(ad->win.layout == NULL, "Invalid parameter!"); icon = elm_image_add(ad->win.layout); - retif(!icon, , "Cannot create elm icon object!"); + retm_if(!icon, "Cannot create elm icon object!"); if (strncmp(img_path, "/", 1) != 0) { @@ -186,7 +186,7 @@ void util_send_status_message_start(void* data,double duration) { Ecore_Evas *ee_port; win_info* win = (win_info*)data; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); struct appdata *ad = win->data; Indicator_Data_Animation msg = {0,}; @@ -422,8 +422,8 @@ int util_get_block_width(void* data, const char* part) Evas_Object * eo = NULL; int geo_dx = 0; int geo_dy = 0; - retif(data == NULL,-1, "Invalid parameter!"); - retif(part == NULL,-1, "Invalid parameter!"); + retvm_if(data == NULL, -1, "Invalid parameter!"); + retvm_if(part == NULL, -1, "Invalid parameter!"); win_info* win = (win_info*)data; @@ -441,8 +441,8 @@ int util_get_string_width(void* data, const char* part) Evas_Object * eo = NULL; int text_dx = 0; int text_dy = 0; - retif(data == NULL,-1, "Invalid parameter!"); - retif(part == NULL,-1, "Invalid parameter!"); + retvm_if(data == NULL, -1, "Invalid parameter!"); + retvm_if(part == NULL, -1, "Invalid parameter!"); win_info* win = (win_info*)data; @@ -477,7 +477,7 @@ int util_check_noti_ani(const char* path) void util_start_noti_ani(void* data) { icon_s *icon = (icon_s *)data; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); if(util_check_noti_ani(icon->img_obj.data)) { @@ -498,7 +498,7 @@ void util_start_noti_ani(void* data) void util_stop_noti_ani(void* data) { icon_s *icon = (icon_s *)data; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); if(util_check_noti_ani(icon->img_obj.data)) { @@ -520,7 +520,7 @@ void util_stop_noti_ani(void* data) void util_char_replace(char *text, char s, char t) { - retif(text == NULL, , "invalid argument"); + retm_if(text == NULL, "invalid argument"); int i = 0, text_len = 0; |