diff options
author | Uros Majstorovic <majstor@majstor.org> | 2017-08-10 21:02:16 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2017-08-10 21:02:16 +0200 |
commit | cbba099541d27400ad45083a4b1102b86f9e8dea (patch) | |
tree | e260d7da3d07b4de0e989726917f08d23c55f70d /code/core/htable | |
parent | e9ced8e60689c6f46ac4fc31013b88f4c3f4fa80 (diff) |
rbuffer almost implemented
Diffstat (limited to 'code/core/htable')
-rw-r--r-- | code/core/htable/htable.c | 9 |
1 files changed, 2 insertions, 7 deletions
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; } |