Skip to content

Commit 9cc904d

Browse files
author
Erik Aigner
committed
repository: fix garbage return value
error was never initialized and a garbage value returned on success.
1 parent 2f7b6ad commit 9cc904d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/repository.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2216,7 +2216,7 @@ int git_repository_foreach_head(git_repository *repo,
22162216
{
22172217
git_strarray worktrees = GIT_VECTOR_INIT;
22182218
git_buf path = GIT_BUF_INIT;
2219-
int error;
2219+
int error = 0;
22202220
size_t i;
22212221

22222222

0 commit comments

Comments
 (0)