xdiff tail trimming: use correct type.
Inside xdiff library, the number of context lines is represented in long, not int. Noticed by Peter Baumann. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Dec 14, 2007 at 12:00 UTC
29ab27f4b505dd6a56ded42ab2797c3e56f810b2
1 file changed
+2
-3
xdiff-interface.c
+2
-3
@@ -107,11 +107,10 @@ int xdiff_outf(void *priv_, mmbuffer_t *mb, int nbuf)
107
* Trim down common substring at the end of the buffers,
108
* but leave at least ctx lines at the end.
109
*/
110
-static void trim_common_tail(mmfile_t *a, mmfile_t *b, int ctx)
110
+static void trim_common_tail(mmfile_t *a, mmfile_t *b, long ctx)
111
{
112
const int blk = 1024;
113
- long trimmed = 0, recovered = 0;
114
- int i;
113
+ long trimmed = 0, recovered = 0, i;
114
char *ap = a->ptr + a->size;
115
char *bp = b->ptr + b->size;
116
long smaller = (a->size < b->size) ? a->size : b->size;