summaryrefslogtreecommitdiff
path: root/memcache
diff options
context:
space:
mode:
authorpquerna <pquerna@13f79535-47bb-0310-9956-ffa450edef68>2007-09-20 22:15:40 +0000
committerpquerna <pquerna@13f79535-47bb-0310-9956-ffa450edef68>2007-09-20 22:15:40 +0000
commit421c1fe3eac644ab614a34fb8e3252fc201fb1dc (patch)
treec01aad969b752ce5566ed608f5b28630c5088317 /memcache
parent1a260c549a21936805eca05544036a09aea05a29 (diff)
downloadlibapr-util-421c1fe3eac644ab614a34fb8e3252fc201fb1dc.tar.gz
Spell length correctly in the code. Check for it in another place.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@577947 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'memcache')
-rw-r--r--memcache/apr_memcache.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/memcache/apr_memcache.c b/memcache/apr_memcache.c
index e18f5e9d..eb65ff37 100644
--- a/memcache/apr_memcache.c
+++ b/memcache/apr_memcache.c
@@ -761,7 +761,7 @@ apr_memcache_getp(apr_memcache_t *mc,
}
length = apr_strtok(NULL, " ", &last);
- if (lenth) {
+ if (length) {
len = atoi(length);
}
@@ -1307,7 +1307,7 @@ apr_memcache_multgetp(apr_memcache_t *mc,
char *start;
char *last;
char *data;
- apr_size_t len;
+ apr_size_t len = 0;
start = conn->buffer;
key = apr_strtok(conn->buffer, " ", &last); /* just the VALUE, ignore */
@@ -1316,7 +1316,9 @@ apr_memcache_multgetp(apr_memcache_t *mc,
length = apr_strtok(NULL, " ", &last);
- len = atoi(length);
+ if (length) {
+ len = atoi(length);
+ }
value = apr_hash_get(values, key, strlen(key));