From ed6e8038f98e7f15e571a9a291ee4acf438b4dc5 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 2 Jun 2016 14:09:22 -0700 Subject: 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 --- archive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archive.c') diff --git a/archive.c b/archive.c index 5d735ae603..42df9748d6 100644 --- a/archive.c +++ b/archive.c @@ -322,7 +322,7 @@ static int path_exists(struct tree *tree, const char *path) pathspec.recursive = 1; ret = read_tree_recursive(tree, "", 0, 0, &pathspec, reject_entry, &pathspec); - free_pathspec(&pathspec); + clear_pathspec(&pathspec); return ret != 0; } -- cgit v1.2.3