From 373849dab33480f2b39829a4eb686594e58f0257 Mon Sep 17 00:00:00 2001 From: ehofman Date: Thu, 4 Jun 2009 11:03:27 +0000 Subject: [PATCH] return the len of the string --- utils/xmlgrep/xml.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/utils/xmlgrep/xml.c b/utils/xmlgrep/xml.c index c02142280..8faa1f962 100644 --- a/utils/xmlgrep/xml.c +++ b/utils/xmlgrep/xml.c @@ -619,7 +619,7 @@ xmlNodeCopyString(const void *id, const char *path, char *buffer, size_t buflen) memcpy(buffer, p, len); *(buffer+len) = '\0'; } - ret = 0; + ret = len; } else if (slen == 0) { @@ -1345,13 +1345,9 @@ __xmlNodeGetPath(void **nc, const char *start, size_t *len, char **name, size_t assert(start != 0); assert(len != 0); - assert(*len != 0); assert(name != 0); assert(*name != 0); assert(nlen != 0); - assert(*nlen != 0); - - if (*nlen > *len) return 0; path = *name; if (*path == '/') path++;