Commit 49ac5ac8fc4b775a27e688e6fdfcbd36e5365891

Carlos Martín Nieto 2012-05-06T13:17:25

transport git: don't use 'error' uninitialized

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/transports/git.c b/src/transports/git.c
index 9eae9a1..9a17419 100644
--- a/src/transports/git.c
+++ b/src/transports/git.c
@@ -112,7 +112,7 @@ static int do_connect(transport_git *t, const char *url)
 	if (gitno_extract_host_and_port(&host, &port, url, GIT_DEFAULT_PORT) < 0)
 		return -1;
 
-	if (gitno_connect(&t->socket, host, port) == 0) {
+	if ((error = gitno_connect(&t->socket, host, port)) == 0) {
 		error = send_request(t->socket, NULL, url);
 	}