summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorRuediger Pluem <rpluem@apache.org>2008-12-16 14:02:19 +0000
committerRuediger Pluem <rpluem@apache.org>2008-12-16 14:02:19 +0000
commit223940444cb258f90c6b7e911d1a21912ce3804e (patch)
tree82f9e7ca2e92d8854a4ca7969bdf5a36b3b3eca0 /strings
parent2df5860949072a29b0530baaf654d3f0e4e2606e (diff)
downloadapr-223940444cb258f90c6b7e911d1a21912ce3804e.tar.gz
* 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. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@727052 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'strings')
-rw-r--r--strings/apr_strings.c2
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