apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject cvs commit: apr-util/xml apr_xml.c
Date Fri, 21 May 2004 07:13:44 GMT
jfclere     2004/05/21 00:13:44

  Modified:    xml      apr_xml.c
  Log:
  Print "No parser." in errbuf when parser is NULL.
  
  Revision  Changes    Path
  1.29      +9 -3      apr-util/xml/apr_xml.c
  
  Index: apr_xml.c
  ===================================================================
  RCS file: /home/cvs/apr-util/xml/apr_xml.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- apr_xml.c	13 Feb 2004 09:55:27 -0000	1.28
  +++ apr_xml.c	21 May 2004 07:13:44 -0000	1.29
  @@ -414,15 +414,21 @@
                                               char *errbuf,
                                               apr_size_t errbufsize)
   {
  -    int error = parser->error;
  +    int error = 0;
       const char *msg;
   
       /* clear our record of an error */
  -    parser->error = 0;
  +    if (parser != NULL) {
  +        error = parser->error;
  +        parser->error = 0;
  +    }
   
       switch (error) {
       case 0:
  -        msg = "No error.";
  +        if (parser != NULL)
  +            msg = "No error.";
  +        else
  +            msg = "No parser.";
           break;
   
       case APR_XML_NS_ERROR_UNKNOWN_PREFIX:
  
  
  

Mime
View raw message