Remove unnecessary bounds check.

This commit is contained in:
Steveice10 2017-03-08 15:13:17 -08:00
parent c5b44683e6
commit dbe6b992e5

View File

@ -50,7 +50,7 @@ int linked_list_index_of(linked_list* list, void* value) {
}
static linked_list_node* linked_list_get_node(linked_list* list, unsigned int index) {
if(index < 0 || index >= list->size) {
if(index >= list->size) {
return NULL;
}
@ -276,4 +276,4 @@ void linked_list_iter_remove(linked_list_iter* iter) {
linked_list_remove_node(iter->list, iter->curr);
iter->curr = NULL;
}
}