summaryrefslogtreecommitdiffstats
path: root/contrib/apr-util/memcache/apr_memcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/apr-util/memcache/apr_memcache.c')
-rw-r--r--contrib/apr-util/memcache/apr_memcache.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/apr-util/memcache/apr_memcache.c b/contrib/apr-util/memcache/apr_memcache.c
index f96d887..f6b911d 100644
--- a/contrib/apr-util/memcache/apr_memcache.c
+++ b/contrib/apr-util/memcache/apr_memcache.c
@@ -183,8 +183,8 @@ apr_memcache_find_server_hash_default(void *baton, apr_memcache_t *mc,
#endif
/* Try the the dead server, every 5 seconds */
if (curtime - ms->btime > apr_time_from_sec(5)) {
+ ms->btime = curtime;
if (mc_version_ping(ms) == APR_SUCCESS) {
- ms->btime = curtime;
make_server_live(mc, ms);
#if APR_HAS_THREADS
apr_thread_mutex_unlock(ms->lock);
@@ -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;
OpenPOWER on IntegriCloud