diff --git a/lab01/zad2/include/linked_list.h b/lab01/zad2/include/linked_list.h index 39bbe2c..54e3a1b 100644 --- a/lab01/zad2/include/linked_list.h +++ b/lab01/zad2/include/linked_list.h @@ -17,7 +17,6 @@ typedef struct { typedef struct { bool success; - size_t index; size_t comparisons; } SearchResult; diff --git a/lab01/zad2/src/linked_list.c b/lab01/zad2/src/linked_list.c index 498d234..a96335f 100644 --- a/lab01/zad2/src/linked_list.c +++ b/lab01/zad2/src/linked_list.c @@ -64,7 +64,6 @@ LinkedList linked_list_merge(LinkedList l1, LinkedList l2) { SearchResult linked_list_search(LinkedList l, void *value, int (*compare_values)(void *v1, void *v2)) { SearchResult result; result.comparisons = 0; - result.index = 0; result.success = false; Node *current = l.head; @@ -74,7 +73,6 @@ SearchResult linked_list_search(LinkedList l, void *value, int (*compare_values) result.success = true; break; } - result.index += 1; current = current->next; } while (current != l.head);