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/HTMLparser.c b/HTMLparser.c
index 5cbc904..2e646ad 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -3389,9 +3389,9 @@
     const xmlChar *name;
     const xmlChar *attname;
     xmlChar *attvalue;
-    const xmlChar **atts = ctxt->atts;
+    const xmlChar **atts;
     int nbatts = 0;
-    int maxatts = ctxt->maxatts;
+    int maxatts;
     int meta = 0;
     int i;
 
@@ -3403,6 +3403,9 @@
     if (CUR != '<') return -1;
     NEXT;
 
+    atts = ctxt->atts;
+    maxatts = ctxt->maxatts;
+
     GROW;
     name = htmlParseHTMLName(ctxt);
     if (name == NULL) {
@@ -3963,7 +3966,7 @@
 	/*
 	 * Capture end position and add node
 	 */
-	if ( currentNode != NULL && ctxt->record_info ) {
+	if (ctxt->record_info) {
 	   node_info.end_pos = ctxt->input->consumed +
 			      (CUR_PTR - ctxt->input->base);
 	   node_info.end_line = ctxt->input->line;