| 68 | } |
| 69 | |
| 70 | void string_list_remove(struct string_list *list, const char *string, |
| 71 | int free_util) |
| 72 | { |
| 73 | bool exact_match; |
| 74 | int i = get_entry_index(list, string, &exact_match); |
| 75 | |
| 76 | if (exact_match) { |
| 77 | if (list->strdup_strings) |
| 78 | free(list->items[i].string); |
| 79 | if (free_util) |
| 80 | free(list->items[i].util); |
| 81 | |
| 82 | list->nr--; |
| 83 | MOVE_ARRAY(list->items + i, list->items + i + 1, list->nr - i); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | bool string_list_has_string(const struct string_list *list, const char *string) |
| 88 | { |
no test coverage detected