X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libhashkit%2Ffunction.c;h=3560abd7ef273f7c0dcbeb0194a089b63bb07c05;hb=6bc6cf720913ae042f36e62e09abce7d340607ab;hp=2e68b58365c8506413cfa0010b7043ae2002c1fe;hpb=4aceed329aee349bf8817dd7e420678df97898f0;p=awesomized%2Flibmemcached diff --git a/libhashkit/function.c b/libhashkit/function.c index 2e68b583..3560abd7 100644 --- a/libhashkit/function.c +++ b/libhashkit/function.c @@ -6,7 +6,7 @@ * the COPYING file in the parent directory for full text. */ -#include "common.h" +#include static hashkit_return_t _set_function(struct hashkit_function_st *self, hashkit_hash_algorithm_t hash_algorithm) { @@ -51,9 +51,10 @@ static hashkit_return_t _set_function(struct hashkit_function_st *self, hashkit_ self->function= hashkit_jenkins; break; case HASHKIT_HASH_CUSTOM: + return HASHKIT_INVALID_ARGUMENT; case HASHKIT_HASH_MAX: default: - return HASHKIT_FAILURE; + return HASHKIT_INVALID_HASH; } self->context= NULL;