mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-05-03 14:56:37 +08:00
Remove unnecessary bounds check.
This commit is contained in:
parent
c5b44683e6
commit
dbe6b992e5
@ -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) {
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -276,4 +276,4 @@ void linked_list_iter_remove(linked_list_iter* iter) {
|
|||||||
|
|
||||||
linked_list_remove_node(iter->list, iter->curr);
|
linked_list_remove_node(iter->list, iter->curr);
|
||||||
iter->curr = NULL;
|
iter->curr = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user