diff options
author | epochqwert <epoch@hacking.allowed.org> | 2015-03-31 13:24:26 -0500 |
---|---|---|
committer | epochqwert <epoch@hacking.allowed.org> | 2015-03-31 13:24:26 -0500 |
commit | 8248b0d0feb145ec1c2a28dee5af44c4d7a25690 (patch) | |
tree | 36ffe1b698b42711ce5d5e3d2a38e888abcb9bfb | |
parent | 5fc8d2a2fbbe55fb3f92c4edd216f9e96d21a288 (diff) | |
download | libhashtable-8248b0d0feb145ec1c2a28dee5af44c4d7a25690.tar.gz libhashtable-8248b0d0feb145ec1c2a28dee5af44c4d7a25690.zip |
fixed up pedantic stuff.
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | hashtable.h | 7 | ||||
-rw-r--r-- | libhashtable.c | 2 |
3 files changed, 6 insertions, 4 deletions
@@ -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)); } |