From cfb1020589d8c9aa25b77c4894f95725cb886371 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 17 Jun 2016 23:29:11 -0500 Subject: [PATCH] librb: dictionaries which use integer keys may use 0 legitimately --- librb/src/dictionary.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/librb/src/dictionary.c b/librb/src/dictionary.c index de55cf8a..f72ceca9 100644 --- a/librb/src/dictionary.c +++ b/librb/src/dictionary.c @@ -138,7 +138,6 @@ rb_dictionary_get_linear_index(rb_dictionary *dict, const void *key) rb_dictionary_element *elem; lrb_assert(dict != NULL); - lrb_assert(key != NULL); elem = rb_dictionary_find(dict, key); if (elem == NULL) @@ -648,7 +647,6 @@ void rb_dictionary_foreach_next(rb_dictionary *dtree, rb_dictionary_element *rb_dictionary_find(rb_dictionary *dict, const void *key) { lrb_assert(dict != NULL); - lrb_assert(key != NULL); /* retune for key, key will be the tree's root if it's available */ rb_dictionary_retune(dict, key); @@ -681,7 +679,6 @@ rb_dictionary_element *rb_dictionary_add(rb_dictionary *dict, const void *key, v rb_dictionary_element *delem; lrb_assert(dict != NULL); - lrb_assert(key != NULL); lrb_assert(data != NULL); lrb_assert(rb_dictionary_find(dict, key) == NULL);