Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] signedness of comparison functions in ftype-integer.c

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Wed, 03 Jan 2007 09:19:59 -0800
Martin Mathieson wrote:

For the more general problem, I see 2 possible solutions:
(1) have both signed and values in the union, and use the appropriate
signed or unsigned parts of the union in the comparison functions
(2) leave the union as it is with unsigned members, cast values in all
the signed versions instead of the unsigned versions

I vote for solution 1 (and have everything that adds a signed value to the protocol tree set the signed value in the union).