Re: [xml] CVS patch for xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml



On Wed, Jun 15, 2005 at 10:31:28AM -0400, jwert ilstechnology com wrote:
List,

Here is a CVS patch for xmlTextReaderReadInnerXml and
xmlTextReaderReadOuterXml.  I added some better (but probably incomplete)
error checking to both functions.

(See attached file: xmlreader.patch)

Hope this helps someone besides me =]

  Activating some compiler debugging flags might be a good idea :-)

xmlreader.c: In function `xmlTextReaderReadInnerXml__internal_alias':
xmlreader.c:1621: warning: comparison between pointer and integer
xmlreader.c: In function `xmlTextReaderReadOuterXml__internal_alias':
xmlreader.c:1662: warning: comparison between pointer and integer

      if( xmlTextReaderExpand(reader) == -1 ) {


 while 

 * Returns a node pointer valid until the next xmlTextReaderRead() call
 *         or NULL in case of error.
 */
xmlNodePtr
xmlTextReaderExpand(xmlTextReaderPtr reader) {


   So the test is of course 
      if (xmlTextReaderExpand(reader) == NULL) {

  With that double fix, applied and commited,

   thanks,

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]