Commit 6810ba089a543a2407b1c8824dffa9b4e1d63975

Michael Schubert 2012-07-28T11:33:12

Fix -Wuninitialized warning

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/reflog.c b/src/reflog.c
index 53cc25f..93f68ea 100644
--- a/src/reflog.c
+++ b/src/reflog.c
@@ -197,7 +197,7 @@ static int create_new_reflog_file(const char *filepath)
 
 int git_reflog_read(git_reflog **reflog, git_reference *ref)
 {
-	int error;
+	int error = -1;
 	git_buf log_path = GIT_BUF_INIT;
 	git_buf log_file = GIT_BUF_INIT;
 	git_reflog *log = NULL;