From cbba099541d27400ad45083a4b1102b86f9e8dea Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Thu, 10 Aug 2017 21:02:16 +0200 Subject: rbuffer almost implemented --- code/core/htable/htable.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'code/core/htable') diff --git a/code/core/htable/htable.c b/code/core/htable/htable.c index 552a03b..82dbcbc 100644 --- a/code/core/htable/htable.c +++ b/code/core/htable/htable.c @@ -5,11 +5,7 @@ #include "hashtable.h" static void *h_create(ECPContext *ctx) { - int rv; - struct hashtable *h = create_hashtable(1000, (unsigned int (*)(void *))ctx->cr.dh_pub_hash_fn, (int (*)(void *, void *))ctx->cr.dh_pub_hash_eq, NULL, NULL, NULL); - if (h == NULL) return NULL; - - return h; + return create_hashtable(1000, (unsigned int (*)(void *))ctx->cr.dh_pub_hash_fn, (int (*)(void *, void *))ctx->cr.dh_pub_hash_eq, NULL, NULL, NULL); } static void h_destroy(void *h) { @@ -23,7 +19,6 @@ static int h_insert(void *h, unsigned char *k, ECPConnection *v) { } static ECPConnection *h_remove(void *h, unsigned char *k) { - printf("REMOVE!!!\n"); return hashtable_remove(h, k); } @@ -38,5 +33,5 @@ int ecp_htable_init(ECPHTableIface *h) { h->insert = h_insert; h->remove = h_remove; h->search = h_search; - return 0; + return ECP_OK; } -- cgit v1.2.3