diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2006-03-09 14:13:55 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2006-03-09 14:13:55 +0000 |
commit | 30e7607b7a346695691cd819361b3c11e8d11d00 (patch) | |
tree | 47ea2b445c24e5d60abce2db9b0f2e789639d600 /HTMLparser.c | |
parent | 53cd4a1b4ef8be397548470fd0c3075c8d67c25c (diff) | |
download | android_external_libxml2-30e7607b7a346695691cd819361b3c11e8d11d00.tar.gz android_external_libxml2-30e7607b7a346695691cd819361b3c11e8d11d00.tar.bz2 android_external_libxml2-30e7607b7a346695691cd819361b3c11e8d11d00.zip |
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 'HTMLparser.c')
-rw-r--r-- | HTMLparser.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/HTMLparser.c b/HTMLparser.c index 5cbc9040..2e646ad2 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -3389,9 +3389,9 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) { 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 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) { if (CUR != '<') return -1; NEXT; + atts = ctxt->atts; + maxatts = ctxt->maxatts; + GROW; name = htmlParseHTMLName(ctxt); if (name == NULL) { @@ -3963,7 +3966,7 @@ htmlParseElement(htmlParserCtxtPtr ctxt) { /* * 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; |