summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2012-09-26 14:25:37 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2012-09-26 14:25:37 +0000
commitfc1e3fe2ae815e9a71183f8557677677c7f099aa (patch)
tree75bcc4399db277c4ddb92b3bad4d122aadd552b4
parent5724b0ba86b75f8fc23d51a466c5df4088122599 (diff)
downloadlibapr-util-fc1e3fe2ae815e9a71183f8557677677c7f099aa.tar.gz
merge these fixes from trunk:
r982408: - Fix mismatched signed comparisons [1] - While here replace atoi with strtol(3) Reported by: sf via gcc [1] r982409: - this is handling the error condition, not success [note, testmemcache apparently doesn't hit this path] git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/branches/1.4.x@1390512 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--memcache/apr_memcache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/memcache/apr_memcache.c b/memcache/apr_memcache.c
index 7045a46e..f6b911d9 100644
--- a/memcache/apr_memcache.c
+++ b/memcache/apr_memcache.c
@@ -787,10 +787,10 @@ apr_memcache_getp(apr_memcache_t *mc,
length = apr_strtok(NULL, " ", &last);
if (length) {
- len = atoi(length);
+ len = strtol(length, (char **)NULL, 10);
}
- if (len < 0) {
+ if (len == 0 ) {
*new_length = 0;
*baton = NULL;
}
@@ -1356,14 +1356,14 @@ apr_memcache_multgetp(apr_memcache_t *mc,
length = apr_strtok(NULL, " ", &last);
if (length) {
- len = atoi(length);
+ len = strtol(length, (char **) NULL, 10);
}
value = apr_hash_get(values, key, strlen(key));
if (value) {
- if (len >= 0) {
+ if (len != 0) {
apr_bucket_brigade *bbb;
apr_bucket *e;