Commit efadf28d846329ef2ac1a74a632942d5234b8cd8

Edward Thomson 2016-05-26T12:39:09

filebuf: fix uninitialized warning

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/filebuf.c b/src/filebuf.c
index 101d508..507f6a9 100644
--- a/src/filebuf.c
+++ b/src/filebuf.c
@@ -70,7 +70,7 @@ static int lock_file(git_filebuf *file, int flags, mode_t mode)
 		git_file source;
 		char buffer[FILEIO_BUFSIZE];
 		ssize_t read_bytes;
-		int error;
+		int error = 0;
 
 		source = p_open(file->path_original, O_RDONLY);
 		if (source < 0) {