diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-28 23:52:19 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-28 23:52:19 +0300 |
commit | cd27bc7a0bdb7e62090c503b9e8ab4b4a6bb3d06 (patch) | |
tree | d056097ed72d93eedc487640b463bde3650cd9a3 /worktree.c | |
parent | c772d1bcdc058d655e6cd3518440a721433cb511 (diff) | |
parent | 33ad9ddd0b5398063f0aabea639b5fe569f458ea (diff) |
Merge branch 'rs/strbuf-add-real-path' into maint
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/worktree.c b/worktree.c index 0486e31ad4..fa7bc67a50 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(); |