diff options
author | Russell Belfer <arrbee@arrbee.com> | 2012-03-16 15:56:01 -0700 |
---|---|---|
committer | Russell Belfer <arrbee@arrbee.com> | 2012-03-16 15:56:01 -0700 |
commit | 0d0fa7c3681e4ef3d0452666a9bc97d4b08391c9 (patch) | |
tree | 5e03e03bf9dc2f6125f4fb450cd3239d882b824f /src/cache.c | |
parent | 4cfe2ab60b1e26554b2bf753b06f538cb3475bd0 (diff) | |
download | libgit2-0d0fa7c3681e4ef3d0452666a9bc97d4b08391c9.tar.gz |
Convert attr, ignore, mwindow, status to new errors
Also cleaned up some previously converted code that still had
little things to polish.
Diffstat (limited to 'src/cache.c')
-rw-r--r-- | src/cache.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cache.c b/src/cache.c index 9e566792a..f445e906d 100644 --- a/src/cache.c +++ b/src/cache.c @@ -32,11 +32,10 @@ int git_cache_init(git_cache *cache, size_t size, git_cached_obj_freeptr free_pt git_mutex_init(&cache->lock); cache->nodes = git__malloc(size * sizeof(git_cached_obj *)); - if (cache->nodes == NULL) - return GIT_ENOMEM; + GITERR_CHECK_ALLOC(cache->nodes); memset(cache->nodes, 0x0, size * sizeof(git_cached_obj *)); - return GIT_SUCCESS; + return 0; } void git_cache_free(git_cache *cache) |