Added an assert in hashmap_first()

This commit is contained in:
Robert James Kaes 2002-04-26 16:51:29 +00:00
parent e9f5b2e75f
commit 1d78e63233

View File

@ -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 * A hashmap implementation. The keys are case-insensitive NULL terminated
* strings, and the data is arbitrary lumps of data. Copies of both the * 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; ptr->len = len;
map->end_iterator++; map->end_iterator++;
return 0; return 0;
} }
@ -260,6 +259,8 @@ hashmap_insert(hashmap_t map, const char *key,
hashmap_iter hashmap_iter
hashmap_first(hashmap_t map) hashmap_first(hashmap_t map)
{ {
assert(map != NULL);
if (!map) if (!map)
return -EINVAL; return -EINVAL;