builtin-grep: printf %.*s length is int, not ptrdiff_t.

Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Junio C Hamano 2006-05-02 01:28:02 -07:00
parent 1362671f6a
commit a24f1e254e
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ static void show_line(struct grep_opt *opt, const char *bol, const char *eol,
printf("%s%c", name, sign);
if (opt->linenum)
printf("%d%c", lno, sign);
printf("%.*s\n", eol-bol, bol);
printf("%.*s\n", (int)(eol-bol), bol);
}

static int grep_buffer(struct grep_opt *opt, const char *name,