You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2004/06/14 17:13:14 UTC

cvs commit: apr-util/xml apr_xml.c

jorton      2004/06/14 08:13:14

  Modified:    xml      apr_xml.c
  Log:
  * xml/apr_xml.c (apr_xml_parser_geterror): Revert r1.29 which added
  unnecessary argument validation.
  
  Revision  Changes    Path
  1.30      +3 -9      apr-util/xml/apr_xml.c
  
  Index: apr_xml.c
  ===================================================================
  RCS file: /home/cvs/apr-util/xml/apr_xml.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -d -w -u -r1.29 -r1.30
  --- apr_xml.c	21 May 2004 07:13:44 -0000	1.29
  +++ apr_xml.c	14 Jun 2004 15:13:14 -0000	1.30
  @@ -414,21 +414,15 @@
                                               char *errbuf,
                                               apr_size_t errbufsize)
   {
  -    int error = 0;
  +    int error = parser->error;
       const char *msg;
   
       /* clear our record of an error */
  -    if (parser != NULL) {
  -        error = parser->error;
           parser->error = 0;
  -    }
   
       switch (error) {
       case 0:
  -        if (parser != NULL)
               msg = "No error.";
  -        else
  -            msg = "No parser.";
           break;
   
       case APR_XML_NS_ERROR_UNKNOWN_PREFIX: