]> The Tcpdump Group git mirrors - libpcap/commit
Simplify a bitwise expression in gen_broadcast().
authorDenis Ovsienko <[email protected]>
Fri, 21 Feb 2025 23:27:52 +0000 (23:27 +0000)
committerDenis Ovsienko <[email protected]>
Fri, 21 Feb 2025 23:34:41 +0000 (23:34 +0000)
commit8f426e2ba93fc8998f18e4d9517e525dec87e3a0
tree1bfd040f81d53be8ef94318f9bf8e08adaea6dbd
parenta40bc5cae261c4a91dbd2d5e208b4971a1c11849
Simplify a bitwise expression in gen_broadcast().

Since hostmask is a 32-bit unsigned int, "~0 & hostmask" stands for
"0xFFFFFFFF & hostmask", which always equals hostmask.  The tests for
"ip broadcast" hold as expected.
gencode.c