Commit d3f36e7e5a4e3424545f38223409b5a246de171a

Theo Buehler 2018-04-02T16:29:49

make max_connect static as in the original diffreg.c This way we grow the array instead of doing 64 <<= 1.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/diffreg.c b/lib/diffreg.c
index f4be6a4..cb18b5a 100644
--- a/lib/diffreg.c
+++ b/lib/diffreg.c
@@ -966,7 +966,7 @@ change(FILE *outfile, struct got_diff_state *ds, struct got_diff_args *args,
     const char *file1, FILE *f1, const char *file2, FILE *f2,
     int a, int b, int c, int d, int *pflags)
 {
-	size_t max_context = 64;
+	static size_t max_context = 64;
 	int i;
 
 restart: