Author: pgollucci Date: Wed Aug 4 21:15:02 2010 New Revision: 982408 URL: http://svn.apache.org/viewvc?rev=982408&view=rev Log: - Fix mismatched signed comparisons [1] - While here replace atoi with strtol(3) Reported by: sf via gcc Modified: apr/apr/trunk/memcache/apr_memcache.c Modified: apr/apr/trunk/memcache/apr_memcache.c URL: http://svn.apache.org/viewvc/apr/apr/trunk/memcache/apr_memcache.c?rev=982408&r1=982407&r2=982408&view=diff ============================================================================== --- apr/apr/trunk/memcache/apr_memcache.c (original) +++ apr/apr/trunk/memcache/apr_memcache.c Wed Aug 4 21:15:02 2010 @@ -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;