diff options
author | Vicent Marti <tanoku@gmail.com> | 2015-10-27 17:26:04 +0100 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2015-10-28 10:13:13 +0100 |
commit | 1e5e02b4f47779fe3733b1a6ab24a6ca13099ec3 (patch) | |
tree | ac854971d3609c9065cbaee0119541428bdc9477 /src/sortedcache.c | |
parent | efc659b071e02c6d3b39b32b35ab83233d978956 (diff) | |
download | libgit2-1e5e02b4f47779fe3733b1a6ab24a6ca13099ec3.tar.gz |
pool: Simplify implementation
Diffstat (limited to 'src/sortedcache.c')
-rw-r--r-- | src/sortedcache.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sortedcache.c b/src/sortedcache.c index 115175724..5c2a167a7 100644 --- a/src/sortedcache.c +++ b/src/sortedcache.c @@ -20,8 +20,9 @@ int git_sortedcache_new( sc = git__calloc(1, alloclen); GITERR_CHECK_ALLOC(sc); - if (git_pool_init(&sc->pool, 1, 0) < 0 || - git_vector_init(&sc->items, 4, item_cmp) < 0 || + git_pool_init(&sc->pool, 1); + + if (git_vector_init(&sc->items, 4, item_cmp) < 0 || git_strmap_alloc(&sc->map) < 0) goto fail; |