Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
builtin-grep: printf %.*s length is int, not ptrdiff_t.
[gitweb.git]
/
builtin-grep.c
diff --git
a/builtin-grep.c
b/builtin-grep.c
index 4be1514a4e5ba386ddd0d9c37bbe6e60000504dd..eb821b41b95ad128d12e2362f9048ff810fa225e 100644
(file)
--- a/
builtin-grep.c
+++ b/
builtin-grep.c
@@
-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,