Commit e7a2f03048bd24ce97dafd133898a03796d27899

Stefan Sperling 2019-02-05T15:30:23

fix code before declaration

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/lib/fileindex.c b/lib/fileindex.c
index 406a6af..5208c1b 100644
--- a/lib/fileindex.c
+++ b/lib/fileindex.c
@@ -772,8 +772,9 @@ diff_fileindex_dir(struct got_fileindex *fileindex,
 	dle = TAILQ_FIRST(&dirlist);
 	while ((*ie && got_path_is_child((*ie)->path, path, path_len)) || dle) {
 		if (dle && *ie) {
+			int cmp;
 			de = dle->data;
-			int cmp = cmp_entries((*ie)->path, path, path_len,
+			cmp = cmp_entries((*ie)->path, path, path_len,
 			    de->d_name);
 			if (cmp == 0) {
 				err = cb->diff_old_new(cb_arg, *ie, de, path);