diff options
author | Russell Belfer <rb@github.com> | 2013-06-12 13:46:44 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-06-12 13:46:44 -0700 |
commit | ef3374a8a81786a7b544ed7eded53c95766eb02f (patch) | |
tree | 66a813ad935656e145c583dea8b23c0ccb31c6ef /src/diff_driver.c | |
parent | f9c824c592d7a23f7cc385c25c95a5d0c5c8687e (diff) | |
download | libgit2-ef3374a8a81786a7b544ed7eded53c95766eb02f.tar.gz |
Improvements to git_array
This changes the size data to uint32_t, fixes the array growth
logic to use a simple 1.5x multiplier, and uses a generic inline
function for growing the array to make the git_array_alloc API
feel more natural (i.e. it returns a pointer to the new item).
Diffstat (limited to 'src/diff_driver.c')
-rw-r--r-- | src/diff_driver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/diff_driver.c b/src/diff_driver.c index 5d3274a11..ae2b7c319 100644 --- a/src/diff_driver.c +++ b/src/diff_driver.c @@ -93,7 +93,7 @@ static int diff_driver_add_funcname( return error; } - git_array_alloc(drv->fn_patterns, re_ptr); + re_ptr = git_array_alloc(drv->fn_patterns); GITERR_CHECK_ALLOC(re_ptr); memcpy(re_ptr, &re, sizeof(re)); |