static Eina_Bool indicator_clock_changed_cb(void *data)
{
- char time_str[CLOCK_STR_LEN] = {0,};
- char time_buf[CLOCK_STR_LEN] = {0,};
- char ampm_buf[CLOCK_STR_LEN] = {0,};
- char ampm_str[CLOCK_STR_LEN] = {0,};
- char buf[CLOCK_STR_LEN] = {0,};
- char result[CLOCK_STR_LEN] = {0,};
- char icu_apm[CLOCK_STR_LEN] = {0,};
+ char time_str[128] = {0,};
+ char time_buf[64] = {0,};
+ char ampm_buf[64] = {0,};
+ char ampm_str[128] = {0,};
+ char buf[256] = {0,};
+ char result[512] = {0,};
+ char icu_apm[64] = {0,};
struct tm ts;
time_t ctime;
_E("Fail to add timer !");
}
- indicator_get_apm_by_region(icu_apm, CLOCK_STR_LEN);
- indicator_get_time_by_region(time_buf, CLOCK_STR_LEN);
+ indicator_get_apm_by_region(icu_apm, sizeof(icu_apm));
+ indicator_get_time_by_region(time_buf, sizeof(time_buf));
if (clock_mode == INDICATOR_CLOCK_MODE_12H) {
ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, &locale);
retm_if(ret != SYSTEM_SETTINGS_ERROR_NONE, "Cannot get LOCALE_COUNTRY string");
- _D("Locale: %s", locale);
if (locale == NULL) {
_E("[Error] get value of fail.");
return;
}
+ _D("Locale: %s", locale);
i18n_ustring_copy_ua_n(u_custom_skeleton, s_time_skeleton, ARRAY_SIZE(u_custom_skeleton));
_D("24H :: Before change %s", s_formatted);
s_convert_formatted = _string_replacer(s_formatted, colon, ratio);
- _D("24H :: After change %s", s_convert_formatted);
if (!s_convert_formatted) {
_D("_string_replacer return NULL");
return;
}
+ _D("24H :: After change %s", s_convert_formatted);
util_strlcpy(output, s_convert_formatted, output_size);
char *util_get_real_path(char *special_path)
{
- retvm_if(!special_path, 0, "path:%s", special_path);
+ retvm_if(special_path == NULL, NULL, "path is null");
char *real_path = NULL;
int size;
bool util_reserved_path_check(char *path)
{
- retvm_if(!path, 0, "path:%s", path);
+ retvm_if(path == NULL, false, "path is null");
int i;
for (i = 0; i < ARRAY_SIZE(reserved_paths); ++i)