Commit 989710d9828ef0f90b494903bd1e1bd8b20a8914

Russell Belfer 2013-07-22T11:22:55

Fix warning message about mismatched types

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/fileops.c b/src/fileops.c
index db53d4f..c01ff64 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -630,13 +630,11 @@ static git_futils_dirs_guess_cb git_futils__dir_guess[GIT_FUTILS_DIR__MAX] = {
 int git_futils_dirs_global_init(void)
 {
 	git_futils_dir_t i;
-	git_buf *path;
+	const git_buf *path;
 	int error = 0;
 
-	for (i = 0; i < GIT_FUTILS_DIR__MAX; i++) {
-		if ((error = git_futils_dirs_get(&path, i)) < 0)
-			break;
-	}
+	for (i = 0; !error && i < GIT_FUTILS_DIR__MAX; i++)
+		error = git_futils_dirs_get(&path, i);
 
 	return error;
 }