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
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to