]> The Tcpdump Group git mirrors - tcpdump/commit
802.15.4: fix some compiler warnings.
authorGuy Harris <[email protected]>
Tue, 16 Nov 2021 07:52:08 +0000 (23:52 -0800)
committerGuy Harris <[email protected]>
Tue, 16 Nov 2021 07:52:08 +0000 (23:52 -0800)
commit02dd14c50d696c8087b8a1f842a005c321fb870a
treedad5a52a577f0e22a58d09097484338a43f44d0d
parent963451ed93743db63992d17ba6b0c626c32e954d
802.15.4: fix some compiler warnings.

C's type conversion rules are a barrel of fun.  Did you know that if you
add "2" to an "unsigned short", the result has the type "int", even
though, at least on a machine where "unsigned int" is longer than
"unsigned short", the result is always >= 0?

Add "2U" instead, so that one of the operands is an "unsigned int",
making the result an "unsigned int".
print-802_15_4.c