git » nmdb » commit ea9d44c

Fix the return value for a cache miss in cache_incr().

author Alberto Bertogli
2007-08-28 07:16:37 UTC
committer Alberto Bertogli
2007-08-28 07:16:37 UTC
parent 6334531a5292fc7561ea2091b5c655671d49e1c7

Fix the return value for a cache miss in cache_incr().

Signed-off-by: Alberto Bertogli <albertito@gmail.com>

nmdb/cache.c +1 -1

diff --git a/nmdb/cache.c b/nmdb/cache.c
index 9d1b898..5f8ae14 100644
--- a/nmdb/cache.c
+++ b/nmdb/cache.c
@@ -380,7 +380,7 @@ int cache_incr(struct cache *cd, const unsigned char *key, size_t ksize,
 	e = find_in_chain(c, key, ksize);
 
 	if (e == NULL)
-		return -3;
+		return -1;
 
 	val = e->val;
 	vsize = e->vsize;