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>
This commit is contained in:
@ -107,11 +107,10 @@ int xdiff_outf(void *priv_, mmbuffer_t *mb, int nbuf)
|
|||||||
* Trim down common substring at the end of the buffers,
|
* Trim down common substring at the end of the buffers,
|
||||||
* but leave at least ctx lines at the end.
|
* 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;
|
const int blk = 1024;
|
||||||
long trimmed = 0, recovered = 0;
|
long trimmed = 0, recovered = 0, i;
|
||||||
int i;
|
|
||||||
char *ap = a->ptr + a->size;
|
char *ap = a->ptr + a->size;
|
||||||
char *bp = b->ptr + b->size;
|
char *bp = b->ptr + b->size;
|
||||||
long smaller = (a->size < b->size) ? a->size : b->size;
|
long smaller = (a->size < b->size) ? a->size : b->size;
|
||||||
|
Reference in New Issue
Block a user