http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=24850
User: guy
Date: 2008/04/08 05:49 PM
Log:
The integral type with which an enumerated type is equivalent is,
according to the ANSI C standard, implementation-defined; it could be
unsigned, in which case checking whether it's < 0 will cause a compiler
warning.
Casting a signed enum to unsigned will turn negative values into Really
Big Positive Values, so casting to unsigned and comparing against the
maximum value will catch values with the sign bit set regardless of
whether enums are signed or unsigned.
Directory: /trunk/epan/dissectors/
Changes Path Action
+5 -5 packet-ansi_a.c Modified