From 8248b0d0feb145ec1c2a28dee5af44c4d7a25690 Mon Sep 17 00:00:00 2001 From: epochqwert Date: Tue, 31 Mar 2015 13:24:26 -0500 Subject: fixed up pedantic stuff. --- Makefile | 1 + hashtable.h | 7 ++++--- libhashtable.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 6649739..9b41506 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ TARGET=libhashtable.so all: $(TARGET) $(TARGET): + ./genheader.sh $(CC) $(CFLAGS) -o $(TARGET) libhashtable.c clean: diff --git a/hashtable.h b/hashtable.h index a58a392..60d1b50 100644 --- a/hashtable.h +++ b/hashtable.h @@ -21,7 +21,8 @@ void ll_destroy(struct entry *ll); void ht_destroy(struct hashtable *ht); void ht_freevalues(struct hashtable *ht); int ht_setkey(struct hashtable *ht,char *key,void *value); -struct entry *ll_getentry(struct entry *start,char *msg); +struct entry *ll_getentry(struct entry *start,char *key); struct entry *ht_getentry(struct hashtable *ht,char *key); -struct entry *ht_getnode(struct hashtable *ht,char *msg); -void *ht_getvalue(struct hashtable *ht,char *msg); +struct entry *ht_getnode(struct hashtable *ht,char *key); +void *ht_getvalue(struct hashtable *ht,char *key); +void ht_delete(struct hashtable *ht,char *key); diff --git a/libhashtable.c b/libhashtable.c index 496a3ee..9eb0ed4 100644 --- a/libhashtable.c +++ b/libhashtable.c @@ -160,6 +160,6 @@ void *ht_getvalue(struct hashtable *ht,char *key) { } //delete the node in the linked list in the table entry that matches the key. -void *ht_delete(struct hashtable *ht,char *key) { +void ht_delete(struct hashtable *ht,char *key) { ll_delete(ht_getentry(ht,key)); } -- cgit v1.2.3