瀏覽代碼

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;
 			}