Skip to content

Commit

Permalink
xdiff tail trimming: use correct type.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Dec 14, 2007
1 parent 913b45f commit 29ab27f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions xdiff-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 29ab27f

Please sign in to comment.