ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 36659: / /trunk/epan/dissectors/: Ma

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 19 Apr 2011 13:25:12 -0700
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?