MCPcopy Index your code
hub / github.com/git/git / string_list_clear_func

Function string_list_clear_func

string-list.c:181–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181void string_list_clear_func(struct string_list *list, string_list_clear_func_t clearfunc)
182{
183 if (list->items) {
184 if (clearfunc) {
185 for (size_t i = 0; i < list->nr; i++)
186 clearfunc(list->items[i].util, list->items[i].string);
187 }
188 if (list->strdup_strings) {
189 for (size_t i = 0; i < list->nr; i++)
190 free(list->items[i].string);
191 }
192 free(list->items);
193 }
194 list->items = NULL;
195 list->nr = list->alloc = 0;
196}
197
198void string_list_setlen(struct string_list *list, size_t nr)
199{

Callers 13

free_mailmap_entryFunction · 0.85
clear_mailmapFunction · 0.85
add_file_cbFunction · 0.85
write_archiveFunction · 0.85
reflog_walk_info_releaseFunction · 0.85
hook_existsFunction · 0.85
run_hooks_optFunction · 0.85
bitmap_writer_freeFunction · 0.85
free_remote_ref_statesFunction · 0.85
prepare_to_commitFunction · 0.85
listFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected