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
This commit is contained in:
Junio C Hamano
2017-03-10 13:24:23 -08:00
6 changed files with 49 additions and 2 deletions

View File

@ -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();