Change-Id: I6159f3232c69e413e1ac79498373901af557c316
Signed-off-by: jinwang.an <jinwang.an@samsung.com>
/* parsing validation */
/* en_US.UTF-8 */
- char arr[20];
+ char arr[21] = {0,};
snprintf(arr, 20, "%s", vconf_value);
- arr[5] = '\0';
+ for (int i = 0; i < strlen(arr); i++) {
+ if ('.' == arr[i]) {
+ arr[i] = 0;
+ SETTING_TRACE("replace . to NULL : %d", i);
+ break;
+ }
+ }
*value = strdup(arr);
free(vconf_value);
vconf_value = NULL;
/* parsing validation */
/* en_US.UTF-8 */
- char arr[20];
+ char arr[21] = {0,};
snprintf(arr, 20, "%s", vconf_value);
- arr[5] = '\0';
+ for (int i = 0; i < strlen(arr); i++) {
+ if ('.' == arr[i]) {
+ arr[i] = 0;
+ SETTING_TRACE("replace . to NULL : %d", i);
+ break;
+ }
+ }
*value = strdup(arr);
free(vconf_value);
vconf_value = NULL;
if (ret_country != NULL && 0 == strcmp(ret_country, new_country)) {
assert(1);
} else {
+ printf("ret:%s new:%s not same\n", ret_country, new_country);
assert(0);
}