Browse Source

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 years ago
parent
commit
c44303616f
1 changed files with 1 additions and 1 deletions
  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;
 			}