Commit 7e48635d16f68397754bf11b101e165355c34d2f

Carlos Martín Nieto 2012-07-23T21:56:06

revparse: initialize 'parsed' in case the user doesn't give a number with the @-notation

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/revparse.c b/src/revparse.c
index 650d7a9..b046928 100644
--- a/src/revparse.c
+++ b/src/revparse.c
@@ -341,7 +341,7 @@ cleanup:
 static int handle_at_syntax(git_object **out, git_reference **ref, const char *spec, int identifier_len, git_repository* repo, const char *curly_braces_content)
 {
 	bool is_numeric;
-	int parsed, error = -1;
+	int parsed = 0, error = -1;
 	git_buf identifier = GIT_BUF_INIT;
 	git_time_t timestamp;