Commit 5f0527aeac65b10b0df9034f5763865d253daf75

Carlos Martín Nieto 2014-05-30T13:06:34

config: initialize the error The error would be uninitialized if we take a snapshot of a config with no backends.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/config.c b/src/config.c
index 4bd27a8..8a0fb65 100644
--- a/src/config.c
+++ b/src/config.c
@@ -139,7 +139,7 @@ int git_config_open_ondisk(git_config **out, const char *path)
 
 int git_config_snapshot(git_config **out, git_config *in)
 {
-	int error;
+	int error = 0;
 	size_t i;
 	file_internal *internal;
 	git_config *config;