Wireshark mailing list archives

Re: [Wireshark-commits] rev 36659: / /trunk/epan/dissectors/: Makefile.common packet-rohc.c


From: Martin Mathieson <martin.r.mathieson () googlemail com>
Date: Tue, 19 Apr 2011 22:05:38 +0100

On Tue, Apr 19, 2011 at 9:25 PM, Guy Harris <guy () alum mit edu> wrote:


On Apr 19, 2011, at 1:23 PM, Stephen Fisher wrote:

Coverity has a warning about this code:

Event result_independent_of_operands: (oct & 2) == 1 is always false
regardless of the values of its operands (logical operand of if).
398           if((oct&0x02)== 1){

Did you mean to bitshift it before the comparison to 1?

Or is this a Boolean flag, so it's just "if (oct & 0x02)" to test whether
the bit is set?


It looks this way - if you look a few lines above at how the TIS is defined,
its just that bit.

Martin


___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: