diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-04-26 16:51:29 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-04-26 16:51:29 +0000 |
commit | 1d78e63233bcd0114d607d9e69ee47008e48cd5d (patch) | |
tree | 2980f9d59d61f23a39f888aa50aad4c754db10ab | |
parent | e9f5b2e75f13fc07f2aded138656d20db1be0e99 (diff) |
Added an assert in hashmap_first()
-rw-r--r-- | src/hashmap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/hashmap.c b/src/hashmap.c index fa827b4..91b351b 100644 --- a/src/hashmap.c +++ b/src/hashmap.c @@ -1,4 +1,4 @@ -/* $Id: hashmap.c,v 1.6 2002-04-25 18:55:56 rjkaes Exp $ +/* $Id: hashmap.c,v 1.7 2002-04-26 16:51:29 rjkaes Exp $ * * A hashmap implementation. The keys are case-insensitive NULL terminated * strings, and the data is arbitrary lumps of data. Copies of both the @@ -248,7 +248,6 @@ hashmap_insert(hashmap_t map, const char *key, ptr->len = len; map->end_iterator++; - return 0; } @@ -260,6 +259,8 @@ hashmap_insert(hashmap_t map, const char *key, hashmap_iter hashmap_first(hashmap_t map) { + assert(map != NULL); + if (!map) return -EINVAL; |