From: Nam KwanWoo Date: Mon, 1 Jul 2013 02:29:12 +0000 (+0900) Subject: change logic to comapre xml file key and input key X-Git-Tag: submit/tizen/20130916.212456~1^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f3f307b0f05b5048ab448621ca97f583db59d25;p=platform%2Fcore%2Fapi%2Fsystem-info.git change logic to comapre xml file key and input key Change-Id: I1f4a9c6f11c7e00bd75b2abf423dfc766d4a06f6 --- diff --git a/src/system_info_parse.c b/src/system_info_parse.c index 88a257a..82da043 100644 --- a/src/system_info_parse.c +++ b/src/system_info_parse.c @@ -125,7 +125,7 @@ int system_info_get_value_from_xml(char *xml_file_path, char *model, char *id_fi id = (char *)xmlGetProp(cur_node, (const xmlChar*)"id"); string = (char *) xmlGetProp(cur_node, (const xmlChar*)"string"); - if (!strncmp(id, id_field, strlen(id_field))) { + if (!strncmp(id, id_field, strlen(id))) { if (!string) { free(id); continue; @@ -156,7 +156,7 @@ int system_info_get_value_from_xml(char *xml_file_path, char *model, char *id_fi id = (char *)xmlGetProp(cur_node, (const xmlChar*)"id"); string = (char *) xmlGetProp(cur_node, (const xmlChar*)"string"); - if (!strncmp(id, id_field, strlen(id_field))) { + if (!strncmp(id, id_field, strlen(id))) { if (!string) { free(id); continue; @@ -240,7 +240,7 @@ int system_info_get_value_from_config_xml(char *feature_tag, const char *name_fi name = (char *)xmlGetProp(cur_node, (const xmlChar*)"name"); type = (char *)xmlGetProp(cur_node, (const xmlChar*)"type"); - if (!strncmp(name, name_field, strlen(name_field))) { + if (!strncmp(name, name_field, strlen(name))) { if (strncmp(type, type_field, strlen(type_field))) { LOGE("INVALID_PARAMETER(0x%08x) : invalid output param", SYSTEM_INFO_ERROR_INVALID_PARAMETER); free(name);