diff options
author | pgollucci <pgollucci@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-04 21:15:02 +0000 |
---|---|---|
committer | pgollucci <pgollucci@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-04 21:15:02 +0000 |
commit | 49cace0dcde6a72e3aef748da00d7851e4a3f1fa (patch) | |
tree | 651ed7408604ca38da4c5950e8696c56201ca2d4 /memcache | |
parent | 7e8ef4de4b48b2e763a8f76985d089a6440af4f4 (diff) | |
download | libapr-49cace0dcde6a72e3aef748da00d7851e4a3f1fa.tar.gz |
- Fix mismatched signed comparisons [1]
- While here replace atoi with strtol(3)
Reported by: sf via gcc [1]
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@982408 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'memcache')
-rw-r--r-- | memcache/apr_memcache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/memcache/apr_memcache.c b/memcache/apr_memcache.c index 3332841e2..dc4df8538 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; } @@ -1358,14 +1358,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; |