Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Jun 2012 15:13:48 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Eitan Adler <eadler@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r236377 - head/sys/dev/vxge/vxgehal
Message-ID:  <20120601150242.V1226@besplex.bde.org>
In-Reply-To: <201206010423.q514NKtf083043@svn.freebsd.org>
References:  <201206010423.q514NKtf083043@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 1 Jun 2012, Eitan Adler wrote:

> Author: eadler
> Date: Fri Jun  1 04:23:20 2012
> New Revision: 236377
> URL: http://svn.freebsd.org/changeset/base/236377
>
> Log:
>  Fix warning generated by clang;
>  	warning: equality comparison with extraneous parentheses
>  	[-Wparentheses-equality]
>
>  Reported by:	arundel
>  Reviewed by:	gnn
>  Approved by:	cperciva
>  MFC after:	3 days
>
> Modified:
>  head/sys/dev/vxge/vxgehal/vxgehal-channel.h
>
> Modified: head/sys/dev/vxge/vxgehal/vxgehal-channel.h
> ==============================================================================
> --- head/sys/dev/vxge/vxgehal/vxgehal-channel.h	Fri Jun  1 03:59:08 2012	(r236376)
> +++ head/sys/dev/vxge/vxgehal/vxgehal-channel.h	Fri Jun  1 04:23:20 2012	(r236377)
> @@ -291,7 +291,7 @@ __hal_channel_dtr_restore(__hal_channel_
> 	else
> 		dtr_index = channel->reserve_index - 1;
>
> -	if ((channel->dtr_arr[dtr_index].dtr == dtrh)) {
> +	if ((channel->dtr_arr[dtr_index].dtr = dtrh) != NULL) {
>
> 		channel->reserve_index = dtr_index;
> 		channel->dtr_arr[dtr_index].state = VXGE_HAL_CHANNEL_DTR_FREE;
>

This seems to change a style by (excessive parentheses for a normal
equality test) into logic bug (assignment of dtrh instead of compariing
with it).

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120601150242.V1226>