summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Aigner <aigner.erik@gmail.com>2019-05-23 10:49:44 +0200
committerErik Aigner <aigner.erik@gmail.com>2019-05-23 10:49:44 +0200
commit9cc904dae15d713aebd9becf83f42c9accb597a1 (patch)
tree2b10580db002acfaf1f636dc265f86f855f92b0e
parent2f7b6ad5070635edefa87e0cff76d897e8df5cfb (diff)
downloadlibgit2-9cc904dae15d713aebd9becf83f42c9accb597a1.tar.gz
repository: fix garbage return value
error was never initialized and a garbage value returned on success.
-rw-r--r--src/repository.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/repository.c b/src/repository.c
index 349ddf1d4..8b9002890 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -2216,7 +2216,7 @@ int git_repository_foreach_head(git_repository *repo,
{
git_strarray worktrees = GIT_VECTOR_INIT;
git_buf path = GIT_BUF_INIT;
- int error;
+ int error = 0;
size_t i;