소스 검색

Return xmlChar (unsigned char) as char

The libxml2 library has a type xmlChar. It's a typedef'ed unsigned char.
I don't know why libxml2 use unsigned char * for strings instead of
char *. Return converted xmlChar as (char *).
Serj Kalichev 12 년 전
부모
커밋
c44303616f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      clish/shell/shell_libxml2.c

+ 1 - 1
clish/shell/shell_libxml2.c

@@ -166,7 +166,7 @@ char *clish_xmlnode_fetch_attr(clish_xmlnode_t *node,
 		while (a) {
 			if (strcmp((char*)a->name, attrname) == 0) {
 				if (a->children && a->children->content)
-					return a->children->content;
+					return (char *)a->children->content;
 				else
 					return NULL;
 			}