From: René Scharfe Date: Sat, 27 Feb 2010 11:53:00 GMT Subject: Re: [PATCH 4/5] grep: Colorize filename, line number, and separator Message-ID: <4B89079C.8030206@lsrfire.ath.cx> In-Reply-To: <1267246670-19118-5-git-send-email-lodatom@gmail.com> Forgot one thing in my earlier reply: Am 27.02.2010 05:57, schrieb Mark Lodato: > @@ -548,12 +565,9 @@ static void show_line(struct grep_opt *opt, char *bol, char *eol, > break; > > opt->output(opt, bol, match.rm_so); > - opt->output(opt, opt->color_match, > - strlen(opt->color_match)); > - opt->output(opt, bol + match.rm_so, > - (int)(match.rm_eo - match.rm_so)); > - opt->output(opt, GIT_COLOR_RESET, > - strlen(GIT_COLOR_RESET)); > + output_color(opt, bol + match.rm_so, > + (int)(match.rm_eo - match.rm_so), > + opt->color_match); The third parameter of output_color() (and of ->output(), so you didn't introduce this, of course) is a size_t, so why cast to int? Is a cast needed at all?