Commit e06dd9b6d650008c1b0731dea2de5dea1884fd28

Vicent Marti 2011-03-04T15:23:52

Fix 'possibly uninitialized variable' warning

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/refs.c b/src/refs.c
index 542401c..10df8e0 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -405,7 +405,7 @@ static int packed_parse_oid(
 		const char **buffer_out,
 		const char *buffer_end)
 {
-	reference_oid *ref;
+	reference_oid *ref = NULL;
 
 	const char *buffer = *buffer_out;
 	const char *refname_begin, *refname_end;