pathspec: rename free_pathspec() to clear_pathspec()
The function takes a pointer to a pathspec structure, and releases the resources held by it, but does not free() the structure itself. Such a function should be called "clear", not "free". Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -489,7 +489,7 @@ void copy_pathspec(struct pathspec *dst, const struct pathspec *src)
|
||||
sizeof(struct pathspec_item) * dst->nr);
|
||||
}
|
||||
|
||||
void free_pathspec(struct pathspec *pathspec)
|
||||
void clear_pathspec(struct pathspec *pathspec)
|
||||
{
|
||||
free(pathspec->items);
|
||||
pathspec->items = NULL;
|
||||
|
Reference in New Issue
Block a user