summaryrefslogtreecommitdiff
path: root/src/delta-apply.c
diff options
context:
space:
mode:
authorJakob Pfender <jpfender@elegosoft.com>2011-05-17 17:21:00 +0200
committerVicent Marti <tanoku@gmail.com>2011-05-23 20:43:58 +0300
commit21dcb75abd9b03b15853d820f884d32d7d534f41 (patch)
tree369eabd14407e35bb24041ac3269a7f32a31bc20 /src/delta-apply.c
parent5c36f6dbe85ea51dbeb5daa84180214dea7c5db3 (diff)
downloadlibgit2-21dcb75abd9b03b15853d820f884d32d7d534f41.tar.gz
delta-apply.c: Use GIT_ENOMEM instead of GIT_ERROR when allocating
git__delta_apply used to return with a generic GIT_ERROR when allocating memory for the delta failed. Fix this to return GIT_ENOMEM.
Diffstat (limited to 'src/delta-apply.c')
-rw-r--r--src/delta-apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/delta-apply.c b/src/delta-apply.c
index 16f26be44..5bcdc2003 100644
--- a/src/delta-apply.c
+++ b/src/delta-apply.c
@@ -52,7 +52,7 @@ int git__delta_apply(
return GIT_ERROR;
if ((res_dp = git__malloc(res_sz + 1)) == NULL)
- return GIT_ERROR;
+ return GIT_ENOMEM;
res_dp[res_sz] = '\0';
out->data = res_dp;
out->len = res_sz;