mirror of
https://git.proxmox.com/git/libgit2
synced 2025-11-03 02:53:33 +00:00
array: Wrap array_alloc as a single statement
This commit is contained in:
parent
51a3dfb595
commit
7334238696
@ -57,9 +57,9 @@ GIT_INLINE(void *) git_array_grow(void *_a, size_t item_size)
|
||||
}
|
||||
|
||||
#define git_array_alloc(a) \
|
||||
((a).size >= (a).asize) ? \
|
||||
(((a).size >= (a).asize) ? \
|
||||
git_array_grow(&(a), sizeof(*(a).ptr)) : \
|
||||
((a).ptr ? &(a).ptr[(a).size++] : NULL)
|
||||
((a).ptr ? &(a).ptr[(a).size++] : NULL))
|
||||
|
||||
#define git_array_last(a) ((a).size ? &(a).ptr[(a).size - 1] : NULL)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user