From 9cc904dae15d713aebd9becf83f42c9accb597a1 Mon Sep 17 00:00:00 2001 From: Erik Aigner Date: Thu, 23 May 2019 10:49:44 +0200 Subject: repository: fix garbage return value error was never initialized and a garbage value returned on success. --- src/repository.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.1