From dbe6b992e5b779c0e5ff3971a3c221a04ea0b52b Mon Sep 17 00:00:00 2001 From: Steveice10 Date: Wed, 8 Mar 2017 15:13:17 -0800 Subject: [PATCH] Remove unnecessary bounds check. --- source/core/linkedlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core/linkedlist.c b/source/core/linkedlist.c index 80a7d12..e0113c8 100644 --- a/source/core/linkedlist.c +++ b/source/core/linkedlist.c @@ -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; -} \ No newline at end of file +}