diff options
author | rpluem <rpluem@13f79535-47bb-0310-9956-ffa450edef68> | 2008-12-18 01:01:54 +0000 |
---|---|---|
committer | rpluem <rpluem@13f79535-47bb-0310-9956-ffa450edef68> | 2008-12-18 01:01:54 +0000 |
commit | 780f62cfbc3e1ae38fe865569f40a6ab58acdf4e (patch) | |
tree | 12d75fbeac71e3b4925eac552a25dded35ac3d20 /strings | |
parent | 5a2db2dfba67e19b54089f38e755397c79509646 (diff) | |
download | libapr-780f62cfbc3e1ae38fe865569f40a6ab58acdf4e.tar.gz |
Merge r727052 from trunk:
* 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.
Submitted by: rpluem
Reviewed by: rpluem
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@727605 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'strings')
-rw-r--r-- | strings/apr_strings.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/strings/apr_strings.c b/strings/apr_strings.c index ec687913c..d20004ead 100644 --- a/strings/apr_strings.c +++ b/strings/apr_strings.c @@ -245,6 +245,7 @@ APR_DECLARE(apr_status_t) apr_strtoff(apr_off_t *offset, const char *nptr, 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 @@ APR_DECLARE(apr_int64_t) apr_strtoi64(const char *nptr, char **endptr, int base) 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 |