Wireshark-bugs: [Wireshark-bugs] [Bug 2822] Unusual use of a Boolean (Lint warning 514)
Date: Thu, 21 Aug 2008 11:56:15 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2822


Bill Meier <wmeier@xxxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wmeier@xxxxxxxxxxx




--- Comment #2 from Bill Meier <wmeier@xxxxxxxxxxx>  2008-08-21 11:56:14 PDT ---
(In reply to comment #0)
> 
> 1) epan\dissectors\packet-isup.c(2277):
> I think this line:
>         coding_standard = (tvb_get_guint8(parameter_tvb, offset)&&0x60)>>5;
> should be:
>         coding_standard = (tvb_get_guint8(parameter_tvb, offset)&0x60)>>5;

Done ...

> 
> 2) epan\dissectors\packet-smb2.c(513):
> Similarly, I think this line:
>         hash=((key->sesid>>32)&0xffffffff)+((key->sesid)&0xffffffff);
> should be:
>         hash=((key->sesid>>32)&0xffffffff)+((key->sesid)&0xffffffff);
> 

I think doing this one is OK as follows:

hash=(guint32)( ((key->sesid>>32)&0xffffffff)+((key->sesid)&0xffffffff) )

We'll have to see if gcc gives any warnings ...


Thanks ....


-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.