summaryrefslogtreecommitdiff
path: root/worktree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-10 21:24:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-10 21:24:23 (GMT)
commitfc32293502e86be2cabbe5e8e5863a2b657207b8 (patch)
tree87798ac7776dc9473d09f94ec45b96398cbc16b9 /worktree.c
parent82682e218a4ebe980345908c31ac9976f7ef4283 (diff)
parent33ad9ddd0b5398063f0aabea639b5fe569f458ea (diff)
downloadgit-fc32293502e86be2cabbe5e8e5863a2b657207b8.zip
git-fc32293502e86be2cabbe5e8e5863a2b657207b8.tar.gz
git-fc32293502e86be2cabbe5e8e5863a2b657207b8.tar.bz2
Merge branch 'rs/strbuf-add-real-path'
An helper function to make it easier to append the result from real_path() to a strbuf has been added. * rs/strbuf-add-real-path: strbuf: add strbuf_add_real_path() cocci: use ALLOC_ARRAY
Diffstat (limited to 'worktree.c')
-rw-r--r--worktree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/worktree.c b/worktree.c
index d633761..d7b911a 100644
--- a/worktree.c
+++ b/worktree.c
@@ -175,7 +175,7 @@ struct worktree **get_worktrees(unsigned flags)
struct dirent *d;
int counter = 0, alloc = 2;
- list = xmalloc(alloc * sizeof(struct worktree *));
+ ALLOC_ARRAY(list, alloc);
list[counter++] = get_main_worktree();