apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r727052 - /apr/apr/trunk/strings/apr_strings.c
Date Tue, 16 Dec 2008 14:02:19 GMT
Author: rpluem
Date: Tue Dec 16 06:02:19 2008
New Revision: 727052

URL: http://svn.apache.org/viewvc?rev=727052&view=rev
Log:
* Similar to apr_strtoff reset errno to zero in apr_strtoi64.
  Cases were observed where apr_strtoi64 returned with a
  previously set errno although the operation worked fine.

Modified:
    apr/apr/trunk/strings/apr_strings.c

Modified: apr/apr/trunk/strings/apr_strings.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/strings/apr_strings.c?rev=727052&r1=727051&r2=727052&view=diff
==============================================================================
--- apr/apr/trunk/strings/apr_strings.c (original)
+++ apr/apr/trunk/strings/apr_strings.c Tue Dec 16 06:02:19 2008
@@ -245,6 +245,7 @@
 APR_DECLARE(apr_int64_t) apr_strtoi64(const char *nptr, char **endptr, int base)
 {
 #ifdef APR_INT64_STRFN
+    errno = 0;
     return APR_INT64_STRFN(nptr, endptr, base);
 #else
     const char *s;
@@ -253,6 +254,7 @@
     int neg, any;
     char c;
 
+    errno = 0;
     /*
      * Skip white space and pick up leading +/- sign if any.
      * If base is 0, allow 0x for hex and 0 for octal, else



Mime
View raw message