X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fnmemsdup.c;h=4ba527dfa493b67f26c5d76487f7af0d8c06b46c;hb=b925ea17d6f146a28d745b0d34e9eec6eafda21f;hp=a0856ec8e05acd2e419128fb46b365b6bdf51700;hpb=fc6d778b923000b5c6ad8e108b0b184178a9d33f;p=yaz-moved-to-github.git diff --git a/src/nmemsdup.c b/src/nmemsdup.c index a0856ec..4ba527d 100644 --- a/src/nmemsdup.c +++ b/src/nmemsdup.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: nmemsdup.c,v 1.8 2006-07-06 10:17:53 adam Exp $ + * $Id: nmemsdup.c,v 1.9 2006-08-11 12:50:23 adam Exp $ */ /** @@ -90,18 +90,18 @@ void nmem_strsplit(NMEM nmem, const char *delim, const char *dstr, } #if YAZ_HAVE_XML2 -char *nmem_text_node_cdata(const void *ptr_cdata, NMEM nmem) +char *nmem_text_node_cdata(const xmlNode *ptr_cdata, NMEM nmem) { char *cdata; int len = 0; const xmlNode *ptr; - for (ptr = (const xmlNode *) ptr_cdata; ptr; ptr = ptr->next) + for (ptr = ptr_cdata; ptr; ptr = ptr->next) if (ptr->type == XML_TEXT_NODE) len += xmlStrlen(ptr->content); cdata = (char *) nmem_malloc(nmem, len+1); *cdata = '\0'; - for (ptr = (const xmlNode *) ptr_cdata; ptr; ptr = ptr->next) + for (ptr = ptr_cdata; ptr; ptr = ptr->next) if (ptr->type == XML_TEXT_NODE) strcat(cdata, (const char *) ptr->content); return cdata;