[ofa-general] Re: [PATCH] osm: QoS: selecting PathRecord according to QoS policy

Sasha Khapyorsky sashak at voltaire.com
Wed Sep 5 09:40:28 PDT 2007


On 17:59 Wed 05 Sep     , Yevgeny Kliteynik wrote:
> >>
> >>  is more readable than
> >>
> >>  	if (comp_mask & IB_PR_COMPMASK_RAWTRAFFIC &&
> >>  	    cl_ntoh32(p_pr->hop_flow_raw) & 1 << 31)
> >>
> >>  ?
> > No. It requires 2+ seconds to make sure that some braces are just
> > "extra" ones.
> > BTW the second is incorrect - should  be (1 << 31), those '()' were
> > needed.
> 
>  No, they weren't :)
> 
>  http://www.cppreference.com/operator_precedence.html

Right, and even gcc -Wparentheses doesn't generate warnings anymore :).

Sasha



More information about the general mailing list