summaryrefslogtreecommitdiff
path: root/uri.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2006-03-09 14:13:55 +0000
committerDaniel Veillard <veillard@src.gnome.org>2006-03-09 14:13:55 +0000
commit30e7607b7a346695691cd819361b3c11e8d11d00 (patch)
tree47ea2b445c24e5d60abce2db9b0f2e789639d600 /uri.c
parent53cd4a1b4ef8be397548470fd0c3075c8d67c25c (diff)
downloadlibxml2-30e7607b7a346695691cd819361b3c11e8d11d00.tar.gz
a bunch of small cleanups based on coverity reports. Daniel
* HTMLparser.c parser.c parserInternals.c pattern.c uri.c: a bunch of small cleanups based on coverity reports. Daniel
Diffstat (limited to 'uri.c')
-rw-r--r--uri.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/uri.c b/uri.c
index 4ac8b200..7d60ffea 100644
--- a/uri.c
+++ b/uri.c
@@ -1078,11 +1078,13 @@ xmlURIEscape(const xmlChar * str)
static int
xmlParseURIFragment(xmlURIPtr uri, const char **str)
{
- const char *cur = *str;
-
+ const char *cur;
+
if (str == NULL)
return (-1);
+ cur = *str;
+
while (IS_URIC(cur) || IS_UNWISE(cur))
NEXT(cur);
if (uri != NULL) {
@@ -1111,11 +1113,13 @@ xmlParseURIFragment(xmlURIPtr uri, const char **str)
static int
xmlParseURIQuery(xmlURIPtr uri, const char **str)
{
- const char *cur = *str;
+ const char *cur;
if (str == NULL)
return (-1);
+ cur = *str;
+
while ((IS_URIC(cur)) ||
((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur))))
NEXT(cur);