summaryrefslogtreecommitdiff
path: root/xdiff-interface.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-12-14 12:00:42 -0800
committerJunio C Hamano <gitster@pobox.com>2007-12-14 12:00:42 -0800
commit29ab27f4b505dd6a56ded42ab2797c3e56f810b2 (patch)
treeb5ce37f70c80408234fd3abac4ab11ae4d3ec02d /xdiff-interface.c
parent913b45f51b151d8e29f86df67d3e10853d831470 (diff)
downloadgit-29ab27f4b505dd6a56ded42ab2797c3e56f810b2.tar.gz
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>
Diffstat (limited to 'xdiff-interface.c')
-rw-r--r--xdiff-interface.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/xdiff-interface.c b/xdiff-interface.c
index f2cd488de0..700def211e 100644
--- a/xdiff-interface.c
+++ b/xdiff-interface.c
@@ -107,11 +107,10 @@ int xdiff_outf(void *priv_, mmbuffer_t *mb, int nbuf)
* Trim down common substring at the end of the buffers,
* but leave at least ctx lines at the end.
*/
-static void trim_common_tail(mmfile_t *a, mmfile_t *b, int ctx)
+static void trim_common_tail(mmfile_t *a, mmfile_t *b, long ctx)
{
const int blk = 1024;
- long trimmed = 0, recovered = 0;
- int i;
+ long trimmed = 0, recovered = 0, i;
char *ap = a->ptr + a->size;
char *bp = b->ptr + b->size;
long smaller = (a->size < b->size) ? a->size : b->size;