1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-23 01:52:48 +03:00

a lot of small cleanups based on Linus' sparse check output. Daniel

* HTMLparser.c SAX2.c encoding.c globals.c parser.c relaxng.c
  runsuite.c runtest.c schematron.c testHTML.c testReader.c
  testRegexp.c testSAX.c testThreads.c valid.c xinclude.c xmlIO.c
  xmllint.c xmlmodule.c xmlschemas.c xpath.c xpointer.c: a lot of
  small cleanups based on Linus' sparse check output.
Daniel
This commit is contained in:
Daniel Veillard
2005-07-28 23:49:35 +00:00
parent 4cd3b51966
commit 24505b0f5c
23 changed files with 109 additions and 92 deletions

View File

@@ -984,14 +984,14 @@ inputPop(xmlParserCtxtPtr ctxt)
if (ctxt == NULL)
return(NULL);
if (ctxt->inputNr <= 0)
return (0);
return (NULL);
ctxt->inputNr--;
if (ctxt->inputNr > 0)
ctxt->input = ctxt->inputTab[ctxt->inputNr - 1];
else
ctxt->input = NULL;
ret = ctxt->inputTab[ctxt->inputNr];
ctxt->inputTab[ctxt->inputNr] = 0;
ctxt->inputTab[ctxt->inputNr] = NULL;
return (ret);
}
/**
@@ -1053,7 +1053,7 @@ nodePop(xmlParserCtxtPtr ctxt)
else
ctxt->node = NULL;
ret = ctxt->nodeTab[ctxt->nodeNr];
ctxt->nodeTab[ctxt->nodeNr] = 0;
ctxt->nodeTab[ctxt->nodeNr] = NULL;
return (ret);
}
@@ -1118,7 +1118,7 @@ nameNsPop(xmlParserCtxtPtr ctxt)
const xmlChar *ret;
if (ctxt->nameNr <= 0)
return (0);
return (NULL);
ctxt->nameNr--;
if (ctxt->nameNr > 0)
ctxt->name = ctxt->nameTab[ctxt->nameNr - 1];
@@ -1184,7 +1184,7 @@ namePop(xmlParserCtxtPtr ctxt)
else
ctxt->name = NULL;
ret = ctxt->nameTab[ctxt->nameNr];
ctxt->nameTab[ctxt->nameNr] = 0;
ctxt->nameTab[ctxt->nameNr] = NULL;
return (ret);
}