remove redunant if statement

This commit is contained in:
Night Kaly 2024-03-20 20:32:43 +00:00
parent f321c26b07
commit 920a660f23
No known key found for this signature in database
GPG key ID: 8E829D3381CFEBBE

6
file.c
View file

@ -102,12 +102,10 @@ void arraylist_add(ArrayList *list, char *filepath, char *stats, char *type, int
if (marked) { if (marked) {
for (int i = 0; i < list->length; i++) { for (int i = 0; i < list->length; i++) {
if (strcmp(list->items[i].path, new_file.path) == 0) { if (strcmp(list->items[i].path, new_file.path) == 0) {
if (force) { if (!force) {
return;
} else {
arraylist_remove(list, i); arraylist_remove(list, i);
return;
} }
return;
} }
} }
} }