Re: [PATCH 4/4] diff.c: Do not initialize a variable, which gets reassigned anyway.

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

 



Stefan Beller wrote:

> Signed-off-by: Stefan Beller <stefanbeller@xxxxxxxxxxxxxx>
> ---
>  diff.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
[...]
> --- a/diff.c
> +++ b/diff.c
> @@ -1677,21 +1677,19 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options)
>  		}
>  
>  		/*
>  		 * scale the add/delete
>  		 */
>  		add = added;
>  		del = deleted;
>  
>  		if (graph_width <= max_change) {
> -			int total = add + del;
> -
> -			total = scale_linear(add + del, graph_width, max_change);
> +			int total = scale_linear(add + del, graph_width, max_change);

Yeah, we should have caught this in review.

Thanks for reporting.
Reviewed-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
--
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]