diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2009-04-22 12:57:24 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2009-04-22 12:57:24 +0000 |
commit | 15e068885fa2a2369caac41d92b0cc1671ffd525 (patch) | |
tree | fa462fe937bbd34cadaea593585a7b877823742e /misc/unix | |
parent | 6c5e29867836775409d5686f580311bb4b628db5 (diff) | |
download | libapr-15e068885fa2a2369caac41d92b0cc1671ffd525.tar.gz |
backport r767498 from trunk
apr_strerror() on OS/2: Fix problem with calculating buffer size.
PR: 45689
Submitted by: Erik Lax <apache datahack.se>
Reviewed by: trawick
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@767500 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'misc/unix')
-rw-r--r-- | misc/unix/errorcodes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/unix/errorcodes.c b/misc/unix/errorcodes.c index 99a81351d..4764998c3 100644 --- a/misc/unix/errorcodes.c +++ b/misc/unix/errorcodes.c @@ -162,7 +162,7 @@ static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err) pos = result; if (len >= sizeof(result)) - len = sizeof(result-1); + len = sizeof(result) - 1; for (c=0; c<len; c++) { /* skip multiple whitespace */ |