Good day, Brad.

I think you should add brackets after *byte !=*
It's helps compiler to understand properly operator priority.

IMHO, more brackets - less pain with priorities, because brackets helps to
set explicit priority.

Best regards,
Roman Barabanov



On Tue, Jul 26, 2011 at 13:35, Brad Hards <br...@frogmouth.net> wrote:

> I'm trying to fix up a stack of warnings given by gcc. Mostly its pretty
> obvious. Sometimes, I'm scratching my head.
>
> What is this supposed to do? Should the second | be a ||?
>
> boolean ber_read_universal_tag(STREAM* s, uint8 tag, boolean pc)
> {
>        uint8 byte;
>
>        stream_read_uint8(s, byte);
>
>        if (byte != (BER_CLASS_UNIV | BER_PC(pc)) | (BER_TAG_MASK & tag))
>                return False;
>
>        return True;
> }
>
>
> ------------------------------------------------------------------------------
> Magic Quadrant for Content-Aware Data Loss Prevention
> Research study explores the data loss prevention market. Includes in-depth
> analysis on the changes within the DLP market, and the criteria used to
> evaluate the strengths and weaknesses of these DLP solutions.
> http://www.accelacomm.com/jaw/sfnl/114/51385063/
> _______________________________________________
> Freerdp-devel mailing list
> Freerdp-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freerdp-devel
>
------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Freerdp-devel mailing list
Freerdp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to