Re: [PATCH 4/5] grep: Colorize filename, line number, and separator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]