Re: [PATCH v3 3/8] wt-status: move wt_status_colors[] into wt_status structure

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

 



On Mon, Aug 10, 2009 at 01:54:20AM -0700, Junio C Hamano wrote:

> @@ -37,6 +38,7 @@ struct wt_status {
>  	int wt_status_relative_paths;
>  	int wt_status_submodule_summary;
>  	enum untracked_status_type show_untracked_files;
> +	char wt_status_colors[6][COLOR_MAXLEN];

Yuck on the magic "6". It should be safe to use

  ARRAY_SIZE(wt_status_colors_default)

since that is computed purely from sizeof's. Though I am not discounting
the possibility that there are compilers which will screw it up.

-Peff
--
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]