summaryrefslogtreecommitdiff
path: root/libhashkit
diff options
context:
space:
mode:
Diffstat (limited to 'libhashkit')
-rw-r--r--libhashkit/digest.c6
-rw-r--r--libhashkit/hsieh.c2
-rw-r--r--libhashkit/ketama.c8
3 files changed, 8 insertions, 8 deletions
diff --git a/libhashkit/digest.c b/libhashkit/digest.c
index f418dc0b..4ff6de29 100644
--- a/libhashkit/digest.c
+++ b/libhashkit/digest.c
@@ -35,13 +35,13 @@ uint32_t libhashkit_digest(const char *key, size_t key_length, hashkit_hash_algo
#ifdef HAVE_HSIEH_HASH
return libhashkit_hsieh(key, key_length);
#else
- return EXIT_FAILURE;
+ return 1;
#endif
case HASHKIT_HASH_MURMUR:
#ifdef HAVE_MURMUR_HASH
return libhashkit_murmur(key, key_length);
#else
- return EXIT_FAILURE;
+ return 1;
#endif
case HASHKIT_HASH_JENKINS:
return libhashkit_jenkins(key, key_length);
@@ -56,5 +56,5 @@ uint32_t libhashkit_digest(const char *key, size_t key_length, hashkit_hash_algo
break;
}
- return EXIT_FAILURE;
+ return 1;
}
diff --git a/libhashkit/hsieh.c b/libhashkit/hsieh.c
index cb5af8ae..ba46ed2c 100644
--- a/libhashkit/hsieh.c
+++ b/libhashkit/hsieh.c
@@ -23,7 +23,7 @@ uint32_t hashkit_hsieh(const char *key, size_t key_length, void *context __attri
int rem;
if (key_length <= 0 || key == NULL)
- return EXIT_SUCCESS;
+ return 0;
rem = key_length & 3;
key_length >>= 2;
diff --git a/libhashkit/ketama.c b/libhashkit/ketama.c
index 560de300..a510e57a 100644
--- a/libhashkit/ketama.c
+++ b/libhashkit/ketama.c
@@ -27,9 +27,9 @@ static int continuum_points_cmp(const void *t1, const void *t2)
hashkit_continuum_point_st *ct2= (hashkit_continuum_point_st *)t2;
if (ct1->value == ct2->value)
- return EXIT_SUCCESS;
+ return 0;
else if (ct1->value > ct2->value)
- return EXIT_FAILURE;
+ return 1;
else
return -1;
}
@@ -71,7 +71,7 @@ int update_continuum(hashkit_st *hashkit)
live_servers= (uint32_t)hashkit->list_size;
if (live_servers == 0)
- return EXIT_SUCCESS;
+ return 0;
if (hashkit->weight_fn == NULL)
{
@@ -159,6 +159,6 @@ int update_continuum(hashkit_st *hashkit)
qsort(hashkit->continuum, hashkit->continuum_points_count, sizeof(hashkit_continuum_point_st),
continuum_points_cmp);
- return EXIT_SUCCESS;
+ return 0;
}
#endif