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
diff --git a/uri.c b/uri.c
index 4ac8b20..7d60ffe 100644
--- a/uri.c
+++ b/uri.c
@@ -1078,11 +1078,13 @@
 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 @@
 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);