- To prevent misunderstanding false as the end of string
- In addition, we can get the readbility
Change-Id: If94ec9337f4360f696c242664e5d32401da5f934
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
char value_intg[LANG_MAX];
int ret;
- memset(value_intg, strncmp(value, "true", 4) ? false : true, sizeof(value_intg));
+ memset(value_intg, strncmp(value, "true", 4) ? 'F' : 'T', sizeof(value_intg));
for (rt = 0; rt < LANG_MAX; rt++) {
if (!runtime[rt].xml_prop)
if (!prop_val)
continue;
- value_intg[runtime[rt].lang] = xmlStrcmp(prop_val, (xmlChar *)"on") ? false : true;
+ value_intg[runtime[rt].lang] = xmlStrcmp(prop_val, (xmlChar *)"on") ? 'F' : 'T';
xmlFree(prop_val);
}
if (!runtime[rt].runtime_type)
break;
if (!strncmp(runtime_type, runtime[rt].runtime_type, RT_PREFIX)) {
- *value = val[runtime[rt].lang];
+ *value = val[runtime[rt].lang] == 'T' ? true : false;
return SYSTEM_INFO_ERROR_NONE;
}
}
_I("Unknown RUNTIME_TYPE, return default value");
}
- *value = val[runtime[DEFAULT].lang];
+ *value = val[runtime[DEFAULT].lang] == 'T' ? true : false;
return SYSTEM_INFO_ERROR_NONE;
}