summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjinwang.an <jinwang.an@samsung.com>2018-04-09 18:22:03 +0900
committerjinwang.an <jinwang.an@samsung.com>2018-04-11 16:15:22 +0900
commit0357cd04b46d16ef43e30e060d8eb0e97693bab7 (patch)
treeb1996c29a72a90c533f7bd41795ed075b0ebce4d
parent4fb9a59ef14952b2c2c2bd2776b0c9ef97dc3da9 (diff)
downloadwatch-setting-0357cd04b46d16ef43e30e060d8eb0e97693bab7.tar.gz
watch-setting-0357cd04b46d16ef43e30e060d8eb0e97693bab7.tar.bz2
watch-setting-0357cd04b46d16ef43e30e060d8eb0e97693bab7.zip
Added initalize buf code in menu title functionsubmit/tizen/20180411.090342accepted/tizen/unified/20180412.073850
Change-Id: Ic147a1e8dd1a429ae45cb3048a61be6d29db2f41 Signed-off-by: jinwang.an <jinwang.an@samsung.com>
-rw-r--r--include/util.h3
-rw-r--r--src/setting-battery.c6
-rw-r--r--src/setting-bluetooth.c2
-rw-r--r--src/setting-clock.c44
-rw-r--r--src/setting-connection.c8
-rw-r--r--src/setting-device.c14
-rw-r--r--src/setting-display.c34
-rw-r--r--src/setting-double.c8
-rw-r--r--src/setting-homescreen.c8
-rw-r--r--src/setting-info.c24
-rw-r--r--src/setting-language.c6
-rw-r--r--src/setting-motion.c4
-rw-r--r--src/setting-notification.c2
-rw-r--r--src/setting-privacy.c4
-rw-r--r--src/setting-reset.c4
-rw-r--r--src/setting-safety.c4
-rw-r--r--src/setting-sound.c24
-rw-r--r--src/setting-vibration.c8
-rw-r--r--src/setting-volume-page.c34
-rw-r--r--src/setting-volume.c4
-rw-r--r--src/setting.c6
-rw-r--r--src/setting_indicator_util.c2
22 files changed, 128 insertions, 125 deletions
diff --git a/include/util.h b/include/util.h
index deef555..2466ef6 100644
--- a/include/util.h
+++ b/include/util.h
@@ -46,6 +46,9 @@
#define SETTING_PACKAGE "watch-setting"
#define SYSTEM_PACKAGE "sys-string"
+#define __SETTING_BUF_SIZE__ 1024
+
+
#ifdef _
#undef _
#endif
diff --git a/src/setting-battery.c b/src/setting-battery.c
index c12ddf2..a4b4f8e 100644
--- a/src/setting-battery.c
+++ b/src/setting-battery.c
@@ -315,7 +315,7 @@ void _battery_lang_changed(void *data, Evas_Object *obj, void *event_info)
Evas_Object *_create_battery_content2(void *data)
{
Evas_Object *layout;
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
appdata *ad = (appdata *)data;
if (ad == NULL)
return NULL;
@@ -536,7 +536,7 @@ static void _power_saving_cb(void *data, Evas_Object *obj, void *event_info)
char *_gl_battery_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
int index = id->index;
if (!strcmp(part, "elm.text.1") || !strcmp(part, "elm.text")) {
@@ -712,7 +712,7 @@ void _pws_popup_cb(void *data, Evas_Object *obj, void *event_info)
elm_object_style_set(label, "popup/default");
elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
char *font_size_frame = "<font_size=34>%s</font_size>";
snprintf(buf, sizeof(buf) - 1, font_size_frame, _("IDS_ST_POP_POWER_SAVER_WILL_BE_ENABLED_THIS_WILL_LIMIT_THE_MAXIMUM_PERFORMANCE_OF_THE_CPU_TURN_OFF_BLUETOOTH_AND_A_LOWER_SCREEN_POWER_LEVEL_WILL_BE_USED_MSG"));
diff --git a/src/setting-bluetooth.c b/src/setting-bluetooth.c
index 595efbd..fa07b57 100644
--- a/src/setting-bluetooth.c
+++ b/src/setting-bluetooth.c
@@ -578,7 +578,7 @@ static char *_get_device_name()
static char *_gl_bt_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Bt_Item_Data *id = data;
int index = id->index;
char expression[32];
diff --git a/src/setting-clock.c b/src/setting-clock.c
index 229b192..5daa29d 100644
--- a/src/setting-clock.c
+++ b/src/setting-clock.c
@@ -147,32 +147,32 @@ enum {
static char *
_gl_menu_title_text_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
int title_idx = (uintptr_t)data;
switch (title_idx) {
case CLOCK_TITLE_CLOCK:
- snprintf(buf, 1023, "%s", _("WDS_CLOCK_MBODY_WATCH_FACES_AND_STYLES"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("WDS_CLOCK_MBODY_WATCH_FACES_AND_STYLES"));
break;
case CLOCK_TITLE_LANGUAGE:
- snprintf(buf, 1023, "%s", _("IDS_ST_BUTTON_LANGUAGE"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BUTTON_LANGUAGE"));
break;
case CLOCK_TITLE_SCREEN_TIMEOUT:
- snprintf(buf, 1023, "%s", _("IDS_ST_MBODY_SCREEN_TIMEOUT_ABB"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_MBODY_SCREEN_TIMEOUT_ABB"));
break;
case CLOCK_TITLE_FONT:
- snprintf(buf, 1023, "%s", _("IDS_ST_BODY_FONT"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BODY_FONT"));
break;
case CLOCK_TITLE_FONT_STYLE:
- snprintf(buf, 1023, "%s", _("IDS_ST_BODY_FONT_STYLE"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BODY_FONT_STYLE"));
break;
case CLOCK_TITLE_FONT_SIZE:
- snprintf(buf, 1023, "%s", _("IDS_ST_BODY_FONT_SIZE_ABB"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BODY_FONT_SIZE_ABB"));
break;
case CLOCK_TITLE_NOTIFICATION_INDICATOR:
- snprintf(buf, 1023, "%s", _("WDS_CLOCK_MBODY_NOTIFICATION_INDICATOR"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("WDS_CLOCK_MBODY_NOTIFICATION_INDICATOR"));
break;
case CLOCK_TITLE_ROTATE:
- snprintf(buf, 1023, "%s", _("IDS_COM_OPT_ROTATE"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_COM_OPT_ROTATE"));
break;
}
@@ -900,7 +900,7 @@ static int _get_selected_background()
{
char * bg_path = NULL;
char * str = NULL;
- static char buf[1024] = {0};
+ static char buf[__SETTING_BUF_SIZE__] = {0};
int ret = 0;
bg_path = vconf_get_str(VCONFKEY_BGSET);
@@ -908,7 +908,7 @@ static int _get_selected_background()
return 0;
str = strrchr(bg_path, '/');
- snprintf(buf, 1023, "%s", str ? str + 1 : bg_path);
+ snprintf(buf, sizeof(buf)-1, "%s", str ? str + 1 : bg_path);
FREE(bg_path);
@@ -1321,7 +1321,7 @@ static void _vconf_datetime_format_changed_cb(keynode_t *node, void *data)
char *_gl_clock_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0, };
+ char buf[__SETTING_BUF_SIZE__] = {0, };
Clock_Item_Data *id = data;
int index = id->index;
@@ -1336,7 +1336,7 @@ char *_gl_clock_title_get(void *data, Evas_Object *obj, const char *part)
{
int font_size = -1;
char *font_name = NULL;
- char font_buf[1024] = {0, };
+ char font_buf[__SETTING_BUF_SIZE__] = {0, };
char *text_color = "<font color=#4DCFFFC9>%s</font>";
char *text_color_two_args = "<font color=#4DCFFFC9>%s.%s</font>";
if (system_settings_get_value_string(SYSTEM_SETTINGS_KEY_FONT_TYPE, &font_name)
@@ -1574,7 +1574,7 @@ char *_get_time_str()
//char *_gl_date_and_time_title_get(void *data, Evas_Object *obj, const char *part)
//{
-// char buf[1024] = {0,};
+// char buf[__SETTING_BUF_SIZE__] = {0,};
// Item_Data *id = data;
// int index = id->index;
//
@@ -1977,7 +1977,7 @@ char *_get_time_str()
//
//char *_gl_alert_title_get(void *data, Evas_Object *obj, const char *part)
//{
-// char buf[1024] = {0,};
+// char buf[__SETTING_BUF_SIZE__] = {0,};
// Alert_Item_Data *id = data;
// int index = id->index;
//
@@ -2269,7 +2269,7 @@ void _noti_indicator_help_popup_cb(void *data, Evas_Object *obj, void *event_inf
ad->popup = popup;
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
char *font_size_frame = "<font=Tizen><style=Thin><align=center>%s</align></style></font>";
snprintf(buf, sizeof(buf) - 1, font_size_frame, "&nbsp;<br>Show a yellow indicator on the watch face when there are unread notifications.");
@@ -2362,7 +2362,7 @@ static Evas_Object *_gl_clock_noti_indicator_check_get(void *data, Evas_Object *
static char *_gl_noti_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Clock_Item_Data *id = data;
int index = id->index;
@@ -2587,7 +2587,7 @@ static void _clock_watch_always_check_cb(void *data, Evas *e, Evas_Object *obj,
ad->popup = popup;
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
char *font_size_frame = "<text_class=tizen><align=center>%s</align></text_class>";
snprintf(buf, sizeof(buf) - 1, font_size_frame, _("WDS_CLOCK_TPOP_ENABLING_WATCH_ALWAYS_ON_WILL_SIGNIFICANTLY_INCREASE_BATTERY_CONSUMPTION"));
@@ -2643,7 +2643,7 @@ static void _clock_watch_always_check_cb(void *data, Evas *e, Evas_Object *obj,
//
//static char *get_timezone_str()
//{
-// char buf[1024];
+// char buf[__SETTING_BUF_SIZE__] = {0,};
// ssize_t len = readlink(TZ_SYS_ETC_D"/localtime", buf, sizeof(buf) - 1);
//
// if (len != -1) {
@@ -2680,7 +2680,7 @@ static void _clock_watch_always_check_cb(void *data, Evas *e, Evas_Object *obj,
static char *_gl_font_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0};
+ char buf[__SETTING_BUF_SIZE__] = {0};
char *text_color = "<font color=#4DCFFFC9>%s</font>";
Item_Data *id = data;
@@ -2750,7 +2750,7 @@ static char *_gl_font_title_get(void *data, Evas_Object *obj, const char *part)
static char *_gl_font_style_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Font_Style_Item_Data *id = data;
char *pos = id->font_name;
@@ -2823,7 +2823,7 @@ static char *_gl_font_size_title_get(void *data, Evas_Object *obj, const char *p
!= SYSTEM_SETTINGS_ERROR_NONE) {
DBG("Setting - system_settings_get_value_int() is failed.");
}
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
if (!strcmp(part, "elm.text")) {
diff --git a/src/setting-connection.c b/src/setting-connection.c
index efdeb85..6c96c76 100644
--- a/src/setting-connection.c
+++ b/src/setting-connection.c
@@ -74,8 +74,8 @@ static Ecore_Timer *running_timer = NULL;
static char *
_gl_menu_title_text_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024];
- snprintf(buf, 1023, "%s", _("IDS_ST_BODY_CONNECTIONS"));
+ char buf[__SETTING_BUF_SIZE__] = {0,};
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BODY_CONNECTIONS"));
return strdup(buf);
}
@@ -262,7 +262,7 @@ static void _flight_mode_check_cb(void *data, Evas *e, Evas_Object *obj, void *e
ad->popup = popup;
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
char *font_setting = "<text_class=tizen><align=center>%s</align></text_class>";
snprintf(buf, sizeof(buf) - 1, font_setting, _("WDS_ST_TPOP_FLIGHT_MODE_DISABLES_CALLS_MESSAGING_AND_ALL_CONNECTIONS_TO_USE_WI_FI_AND_BLUETOOTH_GO_TO_SETTINGS"));
@@ -500,7 +500,7 @@ void _flight_mode_cb(void *data, Evas_Object *obj, void *event_info)
char *_gl_connection_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
connection_Item_Data *id = data;
int index = id->index;
int val = 0;
diff --git a/src/setting-device.c b/src/setting-device.c
index 5fefad6..d23b4fd 100644
--- a/src/setting-device.c
+++ b/src/setting-device.c
@@ -79,14 +79,14 @@ enum {
static char *
_gl_menu_title_text_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
int title_idx = (uintptr_t)data;
switch (title_idx) {
case DEVICE_TITLE_DEVICE:
- snprintf(buf, 1023, "%s", _("IDS_ST_BODY_DEVICE"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BODY_DEVICE"));
break;
case DEVICE_TITLE_DOUBLE_PRESS_HOME_KEY:
- snprintf(buf, 1023, "%s", _("WDS_ST_MBODY_DOUBLE_PRESS_HOME_KEY_ABB"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("WDS_ST_MBODY_DOUBLE_PRESS_HOME_KEY_ABB"));
break;
}
@@ -204,7 +204,7 @@ static void _auto_open_apps_check_changed_cb(void *data, Evas *e, Evas_Object *o
ad->popup = popup;
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
char *font_setting = "<text_class=tizen><align=center>%s</align></text_class>";
snprintf(buf, sizeof(buf) - 1, font_setting, _("WDS_HS_TPOP_FOCUSING_ON_ICON_IN_APPS_SCREEN_WILL_OPEN_APP_AUTOMATICALLY"));
@@ -399,7 +399,7 @@ void _auto_open_apps_cb(void *data, Evas_Object *obj, void *event_info)
char *_gl_device_action_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
int index = id->index;
@@ -560,7 +560,7 @@ Evas_Object *_create_device_action_list(void *data)
static char *_gl_double_press_home_key_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
int index = id->index;
@@ -668,7 +668,7 @@ static void _last_app_check_popup_cb(void *data, Evas_Object *obj, void *event_i
ad->popup = popup;
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
char *font_size_frame = "<text_class=tizen><align=center><font_size=28>%s</font_size></align></text_class>";
char *out_string = elm_entry_utf8_to_markup(_("WDS_ST_POP_OPEN_THE_LAST_APP_YOU_USED_BY_PRESSING_THE_HOME_KEY_TWICE_ON_WATCH_FACE_ABB"));
diff --git a/src/setting-display.c b/src/setting-display.c
index 92c312a..e451d47 100644
--- a/src/setting-display.c
+++ b/src/setting-display.c
@@ -112,32 +112,32 @@ enum {
static char *
_gl_menu_title_text_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
int title_idx = (uintptr_t)data;
switch (title_idx) {
case DISPLAY_TITLE_DISPLAY:
- snprintf(buf, 1023, "%s", _("IDS_ST_MBODY_DISPLAY_ABB"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_MBODY_DISPLAY_ABB"));
break;
case DISPLAY_TITLE_LANGUAGE:
- snprintf(buf, 1023, "%s", _("IDS_ST_BUTTON_LANGUAGE"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BUTTON_LANGUAGE"));
break;
case DISPLAY_TITLE_SCREEN_TIMEOUT:
- snprintf(buf, 1023, "%s", _("IDS_ST_MBODY_SCREEN_TIMEOUT_ABB"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_MBODY_SCREEN_TIMEOUT_ABB"));
break;
case DISPLAY_TITLE_FONT:
- snprintf(buf, 1023, "%s", _("IDS_ST_BODY_FONT"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BODY_FONT"));
break;
case DISPLAY_TITLE_FONT_STYLE:
- snprintf(buf, 1023, "%s", _("IDS_ST_BODY_FONT_STYLE"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BODY_FONT_STYLE"));
break;
case DISPLAY_TITLE_FONT_SIZE:
- snprintf(buf, 1023, "%s", _("IDS_ST_BODY_FONT_SIZE_ABB"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BODY_FONT_SIZE_ABB"));
break;
case DISPLAY_TITLE_NOTIFICATION_INDICATOR:
- snprintf(buf, 1023, "%s", _("WDS_CLOCK_MBODY_NOTIFICATION_INDICATOR"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("WDS_CLOCK_MBODY_NOTIFICATION_INDICATOR"));
break;
case DISPLAY_TITLE_ROTATE:
- snprintf(buf, 1023, "%s", _("IDS_COM_OPT_ROTATE"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_COM_OPT_ROTATE"));
break;
}
@@ -306,7 +306,7 @@ void _display_gl_language_cb(void *data, Evas_Object *obj, void *event_info)
char *_gl_display_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Display_Item_Data *id = data;
int index = id->index;
@@ -464,7 +464,7 @@ Evas_Object *_create_display_list(void *data)
static char *_gl_screen_timeout_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
#if FEATURE_SETTING_EMUL
int emul_val = 1;
@@ -661,7 +661,7 @@ void _show_screen_timeout_list(void *data)
static char *_gl_roatate_screen_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
if (!strcmp(part, "elm.text")) {
@@ -974,7 +974,7 @@ static void change_brightness(int brt_index)
static Eina_Bool
_value_changed_rotary(void *data, Evas_Object *obj, Eext_Rotary_Event_Info *info)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Evas_Object *page_layout = (Evas_Object *)data;
if (info->direction == EEXT_ROTARY_DIRECTION_CLOCKWISE) {
@@ -1024,7 +1024,7 @@ _value_changed_rotary(void *data, Evas_Object *obj, Eext_Rotary_Event_Info *info
static void _press_plus_brightness_cb(void *data, Evas_Object *obj, void *event_info)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Evas_Object *page_layout = (Evas_Object *)data;
_brightness_value_plus(data);
@@ -1042,7 +1042,7 @@ static void _press_plus_brightness_cb(void *data, Evas_Object *obj, void *event_
static void _press_minus_brightness_cb(void *data, Evas_Object *obj, void *event_info)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Evas_Object *page_layout = (Evas_Object *)data;
_brightness_value_minus(data);
@@ -1069,7 +1069,7 @@ _accessible_name_cb(void *data, Evas_Object *obj)
static char *
_accessible_name_cb_img(void *data, Evas_Object *obj)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
int text_num = *(int *)data;
switch (text_num) {
case 1:
@@ -1175,7 +1175,7 @@ Evas_Object *_show_brightness_popup(void *data, Evas_Object *obj, void *event_in
rotary event. */
eext_circle_object_slider_step_set(slider, 1.0);
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
snprintf(buf, sizeof(buf), "%02d", brightness_index);
elm_object_part_text_set(page_layout, "elm.text.slider", buf);
diff --git a/src/setting-double.c b/src/setting-double.c
index fa1f085..6b94c4e 100644
--- a/src/setting-double.c
+++ b/src/setting-double.c
@@ -45,8 +45,8 @@ static i18n_ucollator_h *coll = NULL;
static char *
_gl_menu_title_text_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024];
- snprintf(buf, 1023, "%s", "Double Press Home Key");
+ char buf[__SETTING_BUF_SIZE__] = {0,};
+ snprintf(buf, sizeof(buf)-1, "%s", "Double Press Home Key");
return strdup(buf);
}
@@ -228,7 +228,7 @@ static void _gl_double_del(void *data, Evas_Object *obj)
static char *_gl_double_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0, };
+ char buf[__SETTING_BUF_SIZE__] = {0, };
if (!strcmp(part, "elm.text.1") || !strcmp(part, "elm.text")) {
snprintf(buf, sizeof(buf) - 1, "%s", _("IDS_ST_MBODY_DOUBLE_PRESS_ABB"));
@@ -326,7 +326,7 @@ void _last_app_popup_cb(void *data, Evas_Object *obj, void *event_info)
ad->popup = popup;
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
char *font_size_frame = "<text_class=tizen><align=center><font_size=28>%s</font_size></align></text_class>";
snprintf(buf, sizeof(buf) - 1, font_size_frame, "Open the last app you used by pressing the Home key twice on watch face.");
diff --git a/src/setting-homescreen.c b/src/setting-homescreen.c
index 686450a..e66570a 100644
--- a/src/setting-homescreen.c
+++ b/src/setting-homescreen.c
@@ -232,7 +232,7 @@ void _homescreen_gl_edit_apps_cb(void *data, Evas_Object *obj, void *event_info)
/* homescreen main list */
char *_gl_homescreen_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Homescreen_Item_Data *id = data;
int index = id->index;
@@ -334,11 +334,11 @@ static char *_gl_viewtype_title_get(void *data, Evas_Object *obj, const char *pa
char *title = NULL;
if (!strcmp(part, "elm.text")) {
if (!id->index) {
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
snprintf(buf, sizeof(buf) - 1, "%s", _("IDS_HS_OPT_LARGE_ICONS_ABB"));
title = strdup(buf);
} else {
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
snprintf(buf, sizeof(buf) - 1, "%s", _("IDS_HS_OPT_SMALL_ICONS_ABB"));
title = strdup(buf);
}
@@ -444,7 +444,7 @@ void _show_viewtype_list(void *data)
/* home background */
static char *_gl_homebg_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
if (!strcmp(part, "elm.text")) {
diff --git a/src/setting-info.c b/src/setting-info.c
index b2e748e..70b7f58 100644
--- a/src/setting-info.c
+++ b/src/setting-info.c
@@ -74,14 +74,14 @@ enum {
static char *
_gl_menu_title_text_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
int title_idx = (uintptr_t)data;
switch (title_idx) {
case GEAR_INFO_TITLE_GEAR_INFO:
- snprintf(buf, 1023, "%s", _("WDS_ST_MBODY_GEAR_INFO_ABB"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("WDS_ST_MBODY_GEAR_INFO_ABB"));
break;
case GEAR_INFO_TITLE_ABOUT_GEAR:
- snprintf(buf, 1023, "%s", _("IDS_ST_BODY_ABOUT_GEAR_ABB"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BODY_ABOUT_GEAR_ABB"));
break;
}
@@ -265,7 +265,7 @@ void _usb_debug_chk_changed_cb(void *data, Evas *e, Evas_Object *obj, void *even
ad->popup = popup;
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
char *font_size_frame = "<text_class=tizen><align=center>%s</align></text_class>";
snprintf(buf, sizeof(buf) - 1, font_size_frame, _("WDS_ST_POP_ALLOW_GEAR_TO_READ_LOG_DATA_COPY_FILES_TO_AND_FROM_YOUR_PC_AND_INSTALL_APPS_WITHOUT_NOTIFICATION_HDEVELOPMENT_ONLY"));
@@ -323,7 +323,7 @@ static void _info_gl_del(void *data, Evas_Object *obj)
char *_gl_info_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Info_Item_Data *id = data;
int index = id->index;
@@ -443,7 +443,7 @@ static void _info_detail_gl_del(void *data, Evas_Object *obj)
char *_gl_info__detail_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
int index = id->index;
char *device_info = NULL;
@@ -543,7 +543,7 @@ static void open_sources_licences_lange_changed(void *data, Evas_Object *obj, vo
char *license_str = elm_entry_utf8_to_markup(
_("IDS_ST_POP_YOU_CAN_CHECK_ANNOUNCEMENTS_REGARDING_OPEN_SOURCE_LICENCES_BY_FOLLOWING_THE_STEPS_BELOW_N1_GO_TO_SETTINGS_GEAR_INFO_N2_SELECT_USB_MSG"));
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
char *font_size_frame = "<font_size=34>%s</font_size>";
snprintf(buf, sizeof(buf) - 1, font_size_frame, license_str);
@@ -632,7 +632,7 @@ void safety_inform_lange_changed(void *data, Evas_Object *obj, void *event_info)
char *safety_str = elm_entry_utf8_to_markup(_("IDS_ST_BODY_YOU_CAN_CHECK_NOTICES_REGARDING_SAFETY_INFORMATION_BY_FOLLOWING_THE_STEPS_BELOW_N_N1_GO_TO_SETTINGS_MSG"));
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
snprintf(buf, sizeof(buf), "<font_size=34>%s</font_size>", safety_str);
elm_object_text_set(obj, strdup(buf));
FREE(safety_str);
@@ -829,7 +829,7 @@ void _usb_debug_lange_changed(void *data, Evas_Object *obj, void *event_info)
char *debug_str = elm_entry_utf8_to_markup(_("IDS_ST_POP_ENABLING_USB_DEBUGGING_WILL_ALLOW_YOU_TO_COPY_FILES_BETWEEN_YOUR_PC_AND_YOUR_GEAR_INSTALL_APPLICATIONS_ON_YOUR_GEAR_WITHOUT_RECEIVING_MSG"));
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
snprintf(buf, sizeof(buf), "<font_size=34>%s</font_size>", debug_str);
elm_object_text_set(obj, strdup(buf));
@@ -866,9 +866,9 @@ static Eina_Bool _get_imei_serial_info(char *pszBuf, int bufSize)
static char *
_gl_developer_opt_title_text_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
- snprintf(buf, 1023, "%s", _("IDS_ST_BODY_DEVELOPER_OPTIONS"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BODY_DEVELOPER_OPTIONS"));
return strdup(buf);
}
@@ -881,7 +881,7 @@ void _clear_developer_option_cb(void *data, Evas *e, Evas_Object *obj, void *eve
char *_gl_develop_options_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Info_Item_Data *id = data;
int index = id->index;
diff --git a/src/setting-language.c b/src/setting-language.c
index b903f98..d8954d9 100644
--- a/src/setting-language.c
+++ b/src/setting-language.c
@@ -46,8 +46,8 @@ appdata *tmp_ad;
static char *
_gl_menu_title_text_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024];
- snprintf(buf, 1023, "%s", _("IDS_ST_BUTTON_LANGUAGE"));
+ char buf[__SETTING_BUF_SIZE__] = {0,};
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BUTTON_LANGUAGE"));
return strdup(buf);
}
@@ -280,7 +280,7 @@ void _lang_sel_changed_cb(void *data, Evas_Object *obj, void *event_info)
char *_gl_lang_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
int index = id->index;
char *text_color = "<font color=#4DCFFFC9>%s</font>";
diff --git a/src/setting-motion.c b/src/setting-motion.c
index 52d6065..1193060 100644
--- a/src/setting-motion.c
+++ b/src/setting-motion.c
@@ -149,7 +149,7 @@ char *_get_wake_up_gesture_sub_title()
char *_gl_wake_up_guesture_mode_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Motion_Item_Data *id = data;
int index = id->index;
@@ -280,7 +280,7 @@ void _motion_chk_changed_cb(void *data, Evas_Object *obj, void *event_info)
char *_gl_motion_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Motion_Item_Data *id = data;
int index = id->index;
diff --git a/src/setting-notification.c b/src/setting-notification.c
index 353b772..e9bd15c 100644
--- a/src/setting-notification.c
+++ b/src/setting-notification.c
@@ -70,7 +70,7 @@ Eina_Bool _clear_noti_cb(void *data, Elm_Object_Item *it)
char *_gl_noti_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Noti_Item_Data *id = data;
int index = id->index;
diff --git a/src/setting-privacy.c b/src/setting-privacy.c
index 9893c73..e161739 100644
--- a/src/setting-privacy.c
+++ b/src/setting-privacy.c
@@ -119,7 +119,7 @@ static void _gl_privacy_del(void *data, Evas_Object *obj)
char *_gl_privacy_pattern_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
int index = id->index;
@@ -222,7 +222,7 @@ static void _create_privacy_pattern_list(void *data)
char *_gl_privacy_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
int index = id->index;
diff --git a/src/setting-reset.c b/src/setting-reset.c
index c5575e9..2bafd15 100644
--- a/src/setting-reset.c
+++ b/src/setting-reset.c
@@ -51,7 +51,7 @@ void _reset_lange_changed(void *data, Evas_Object *obj, void *event_info)
{
DBG("Setting - _reset_lange_changed() is called!");
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
snprintf(buf, sizeof(buf), "<font_size=34>%s</font_size>",
elm_entry_utf8_to_markup(_("IDS_ST_POP_ALL_DATA_WILL_BE_ERASED_FROM_GEAR_MEMORY_YOU_CAN_THEN_CONNECT_YOUR_GEAR_TO_ANOTHER_DEVICE")));
elm_object_text_set(obj, strdup(buf));
@@ -86,7 +86,7 @@ void _reset_popup_cb(void *data, Evas_Object *obj, void *event_info)
elm_object_style_set(label, "popup/default");
elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__];
char *font_size_frame = "<font_size=34>%s</font_size>";
snprintf(buf, sizeof(buf) - 1, font_size_frame, _("IDS_ST_POP_ALL_DATA_WILL_BE_ERASED_FROM_GEAR_MEMORY_YOU_CAN_THEN_CONNECT_YOUR_GEAR_TO_ANOTHER_DEVICE"));
diff --git a/src/setting-safety.c b/src/setting-safety.c
index 1f1df26..7dfd01b 100644
--- a/src/setting-safety.c
+++ b/src/setting-safety.c
@@ -234,7 +234,7 @@ static int _is_enable(int index)
static char *_gl_safety_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Safety_Item_Data *id = data;
int index = id->index;
@@ -381,7 +381,7 @@ static char *_gl_interval_title_get(void *data, Evas_Object *obj, const char *pa
{
DBG("_gl_interval_title_get() is called.");
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Safety_Item_Data *id = data;
int index = id->index;
diff --git a/src/setting-sound.c b/src/setting-sound.c
index 8bb6b9c..379fe7f 100644
--- a/src/setting-sound.c
+++ b/src/setting-sound.c
@@ -111,26 +111,26 @@ enum {
static char *
_gl_menu_title_text_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
int title_idx = (uintptr_t)data;
switch (title_idx) {
case SOUND_TITLE_SOUND:
- snprintf(buf, 1023, "%s", _("IDS_ST_OPT_SOUND_ABB2"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_OPT_SOUND_ABB2"));
break;
case SOUND_TITLE_SOUND_MODE:
- snprintf(buf, 1023, "%s", _("IDS_ST_OPT_SOUND_MODE_ABB"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_OPT_SOUND_MODE_ABB"));
break;
case SOUND_TITLE_RINGTONE:
- snprintf(buf, 1023, "%s", _("IDS_ST_HEADER_RINGTONES_ABB"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_HEADER_RINGTONES_ABB"));
break;
case SOUND_TITLE_NOTIFICATION:
- snprintf(buf, 1023, "%s", _("IDS_ST_BUTTON_NOTIFICATIONS"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BUTTON_NOTIFICATIONS"));
break;
case SOUND_TITLE_VIBRATION:
- snprintf(buf, 1023, "%s", _("IDS_ST_HEADER_VIBRATION_ABB"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_HEADER_VIBRATION_ABB"));
break;
case SOUND_TITLE_PREF_ARM_MODE:
- snprintf(buf, 1023, "%s", _("IDS_ST_BODY_PREFERRED_ARM_ABB"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BODY_PREFERRED_ARM_ABB"));
break;
}
@@ -436,7 +436,7 @@ static char *_get_sound_file_name(char *full_name)
char *_gl_Sound_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Sound_Item_Data *id = data;
int index = id->index;
char *pa_cur_ringtone = NULL;
@@ -656,7 +656,7 @@ Evas_Object *_create_sound_list(void *data)
static char *_gl_sound_mode_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
int index = id->index;
@@ -964,7 +964,7 @@ static char *_gl_ringtone_text_get(void *data, Evas_Object *obj, const char *par
if (item == NULL)
return NULL;
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
/*DBG("---> %d ---> %s ", (item->index%ringtone_count), ringtone_name_arr[item->index % ringtone_count]); */
snprintf(buf, sizeof(buf) -1, "%s", ringtone_name_arr[item->index % ringtone_count]);
@@ -1222,7 +1222,7 @@ static char *_gl_notification_text_get(void *data, Evas_Object *obj, const char
if (item == NULL)
return NULL;
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
snprintf(buf, sizeof(buf) - 1, "%s", notification_name_arr[item->index % notification_count]);
@@ -1639,7 +1639,7 @@ void _show_vibration_popup_cb(void *data, Evas_Object *obj, void *event_info)
static char *_gl_pref_arm_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
int index = id->index;
diff --git a/src/setting-vibration.c b/src/setting-vibration.c
index ed6607a..191b182 100644
--- a/src/setting-vibration.c
+++ b/src/setting-vibration.c
@@ -71,14 +71,14 @@ enum {
static char *
_gl_menu_title_text_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
int title_idx = (uintptr_t)data;
switch (title_idx) {
case VIBRATION_TITLE_VIBRATION:
- snprintf(buf, 1023, "%s", _("IDS_ST_HEADER_VIBRATION_ABB"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_HEADER_VIBRATION_ABB"));
break;
case VIBRATION_TITLE_INTENSITY:
- snprintf(buf, 1023, "%s", _("IDS_ST_BODY_INTENSITY"));
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_BODY_INTENSITY"));
break;
}
@@ -186,7 +186,7 @@ void _long_buzz_cb(void *data, Evas_Object *obj, void *event_info)
char *_gl_vibration_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
int index = id->index;
diff --git a/src/setting-volume-page.c b/src/setting-volume-page.c
index 0903e9d..ea9d828 100644
--- a/src/setting-volume-page.c
+++ b/src/setting-volume-page.c
@@ -489,7 +489,7 @@ static void set_mute_unmute_page(void *data, int page)
static Eina_Bool
_value_changed_rotary(void *data, Evas_Object *obj, Eext_Rotary_Event_Info *info)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
/*Evas_Object *layout = (Evas_Object *)data; */
page_data *pd = (page_data *)data;
int cur_page = 0;
@@ -537,7 +537,7 @@ void _clear_volume_setting_cb(void *data, Evas_Object *obj, void *event_info)
static void _press_plus_volume_cb(void *data, Evas_Object *obj, void *event_info)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
/*Evas_Object *layout = (Evas_Object *)data; */
page_data *pd = (page_data *)data;
int cur_page = 0;
@@ -555,7 +555,7 @@ static void _press_plus_volume_cb(void *data, Evas_Object *obj, void *event_info
static void _press_minus_volume_cb(void *data, Evas_Object *obj, void *event_info)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
/*Evas_Object *layout = (Evas_Object *)data; */
page_data *pd = (page_data *)data;
int cur_page = 0;
@@ -573,7 +573,7 @@ static void _press_minus_volume_cb(void *data, Evas_Object *obj, void *event_inf
static void _press_mute_numute_cb(void *data, Evas_Object *obj, void *event_info)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
/*Evas_Object *layout = (Evas_Object *)data; */
page_data *pd = (page_data *)data;
int cur_page = 0;
@@ -616,7 +616,7 @@ _accessible_name_cb(void *data, Evas_Object *obj)
static char *
_accessible_name_cb_img_minus(void *data, Evas_Object *obj)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
page_data *pd = (page_data *)data;
int cur_page = 0;
elm_scroller_current_page_get(pd->scroller, &cur_page, NULL);
@@ -629,7 +629,7 @@ _accessible_name_cb_img_minus(void *data, Evas_Object *obj)
static char *
_accessible_name_cb_img_plus(void *data, Evas_Object *obj)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
page_data *pd = (page_data *)data;
int cur_page = 0;
elm_scroller_current_page_get(pd->scroller, &cur_page, NULL);
@@ -641,7 +641,7 @@ _accessible_name_cb_img_plus(void *data, Evas_Object *obj)
static char *
_accessible_name_cb_img_mute_unmute(void *data, Evas_Object *obj)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
page_data *pd = (page_data *)data;
int cur_page = 0;
elm_scroller_current_page_get(pd->scroller, &cur_page, NULL);
@@ -669,7 +669,7 @@ _accessible_volume_name_cb(void *data, Evas_Object *obj)
static char *
_accessible_slider_description_cb(void *data, Evas_Object *obj)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
page_data *pd = (page_data *)data;
int cur_page = 0;
elm_scroller_current_page_get(pd->scroller, &cur_page, NULL);
@@ -799,8 +799,8 @@ Evas_Object *_create_volume_page(void *data)
/*eext_rotary_object_event_activated_set(slider, EINA_TRUE); */
eext_circle_object_slider_step_set(slider, 1.0);
- char buf[1024];
- snprintf(buf, sizeof(buf), "%02d", pd->slider_value[i]);
+ char buf[__SETTING_BUF_SIZE__] = {0,};
+ snprintf(buf, sizeof(buf)-1, "%02d", pd->slider_value[i]);
elm_object_part_text_set(page_layout, "elm.text.slider", buf);
Eina_Bool res = eext_rotary_object_event_callback_add(slider, _value_changed_rotary, pd);
@@ -965,7 +965,7 @@ static void _media_volume_value_minus()
static Eina_Bool
_media_value_changed_rotary(void *data, Evas_Object *obj, Eext_Rotary_Event_Info *info)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
if (info->direction == EEXT_ROTARY_DIRECTION_CLOCKWISE) {
_media_volume_value_plus();
@@ -995,14 +995,14 @@ _media_accessible_volume_name_cb(void *data, Evas_Object *obj)
static char *
_media_accessible_slider_description_cb(void *data, Evas_Object *obj)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
snprintf(buf, sizeof(buf), "Volume, Rotate bezel to adjust %s volume", _(img_string[1]));
return strdup(buf);
}
static void _media_press_minus_volume_cb(void *data, Evas_Object *obj, void *event_info)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
_media_volume_value_minus();
snprintf(buf, sizeof(buf), "%02d", media_slider_value);
@@ -1015,7 +1015,7 @@ static void _media_press_minus_volume_cb(void *data, Evas_Object *obj, void *eve
static void _media_press_plus_volume_cb(void *data, Evas_Object *obj, void *event_info)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
_media_volume_value_plus();
snprintf(buf, sizeof(buf), "%02d", media_slider_value);
@@ -1028,7 +1028,7 @@ static void _media_press_plus_volume_cb(void *data, Evas_Object *obj, void *even
static void _media_press_mute_numute_cb(void *data, Evas_Object *obj, void *event_info)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
if (media_slider_value > 0) {
vconf_set_int(vconf_name_backup[1], media_slider_value);
@@ -1089,7 +1089,7 @@ Evas_Object *_media_create_volume_page(void *data)
rotary event. */
eext_circle_object_slider_step_set(slider, 1.0);
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
snprintf(buf, sizeof(buf), "%02d", media_slider_value);
elm_object_part_text_set(layout, "elm.text.slider", buf);
@@ -1199,7 +1199,7 @@ static void _set_volumn(sound_stream_type_e type, int volume_index, char *vconf_
static void _play_sound_all_type(int sound_type, float volume)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
const char *sound_path = NULL;
int temp_volume_index = 0;
switch (sound_type) {
diff --git a/src/setting-volume.c b/src/setting-volume.c
index 84fd4ff..ad62861 100644
--- a/src/setting-volume.c
+++ b/src/setting-volume.c
@@ -463,7 +463,7 @@ static void _gl_system_cb(void *data, Evas_Object *obj, void *event_info)
char *_gl_volume_title_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
int index = id->index;
if (!strcmp(part, "elm.text")) {
@@ -696,7 +696,7 @@ static void _play_sound_all_type(int sound_type, float volume)
return;
}
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
const char *sound_path = NULL;
int temp_volume_index = 0;
switch (sound_type) {
diff --git a/src/setting.c b/src/setting.c
index c4c82b2..36a7723 100644
--- a/src/setting.c
+++ b/src/setting.c
@@ -76,8 +76,8 @@ static Elm_Object_Item *g_gear_info_item = NULL;
static char *
_gl_menu_title_text_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024];
- snprintf(buf, 1023, "%s", _("IDS_ST_OPT_SETTINGS"));
+ char buf[__SETTING_BUF_SIZE__] = {0,};
+ snprintf(buf, sizeof(buf)-1, "%s", _("IDS_ST_OPT_SETTINGS"));
return strdup(buf);
}
@@ -735,7 +735,7 @@ static char *_gl_text_get(void *data, Evas_Object *obj, const char *part)
static Evas_Object *_gl_icon_get(void *data, Evas_Object *obj, const char *part)
{
- char buf[1024];
+ char buf[__SETTING_BUF_SIZE__] = {0,};
Item_Data *id = data;
int index = id->index;
diff --git a/src/setting_indicator_util.c b/src/setting_indicator_util.c
index 8027295..8cb62c1 100644
--- a/src/setting_indicator_util.c
+++ b/src/setting_indicator_util.c
@@ -67,7 +67,7 @@ void _indicator_set_battery_icon(keynode_t *node, void *data)
{
int battery_level = 100;
int is_battery_display = -1;
- char buf[1024] = {0,};
+ char buf[__SETTING_BUF_SIZE__] = {0,};
char buf2[5] = {0,};
Evas_Object *icon = NULL;