Commit 9331f98acaffd377a8076ab111bed84ff89e8e72

Carlos Martín Nieto 2014-05-22T12:52:31

smart: initialize the error variable

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/transports/smart.c b/src/transports/smart.c
index c9845bf..a5c3e82 100644
--- a/src/transports/smart.c
+++ b/src/transports/smart.c
@@ -79,7 +79,7 @@ int git_smart__update_heads(transport_smart *t, git_vector *symrefs)
 			git_refspec *spec;
 			git_buf buf = GIT_BUF_INIT;
 			size_t j;
-			int error;
+			int error = 0;
 
 			git_vector_foreach(symrefs, j, spec) {
 				git_buf_clear(&buf);