--- a/src/string_list.c Sat Jul 04 11:10:51 2026 +0200 +++ b/src/string_list.c Sat Jul 04 12:09:37 2026 +0200 @@ -28,12 +28,12 @@ #include <assert.h> -static void do_not_free(void* item) { +static void do_not_free(void *item) { (void) item; /* do not do anything with the item */ } -string_list* new_string_list() { - string_list* stringList = malloc(sizeof(string_list)); +string_list *new_string_list() { + string_list *stringList = malloc(sizeof(string_list)); stringList->count = 0; stringList->capacity = 32; stringList->items = calloc(stringList->capacity, sizeof(char*)); @@ -42,7 +42,7 @@ return stringList; } -void destroy_string_list(string_list* list) { +void destroy_string_list(string_list *list) { if (list) { if (list->items) { for (size_t i = 0 ; i < list->count ; i++) { @@ -54,14 +54,14 @@ } } -void add_string(string_list* list, char* item) { +void add_string(string_list *list, char *item) { assert(list != NULL); if (list->count < list->capacity) { list->items[list->count++] = item; return; } size_t newCapacity = list->capacity * 2; - char** reallocated_list = + char **reallocated_list = realloc(list->items, sizeof(char*) * newCapacity); assert(reallocated_list != NULL); list->capacity = newCapacity;