rpcd-mod-luci: fix reporting network device flags
authorJo-Philipp Wich <jo@mein.io>
Mon, 6 Feb 2023 14:46:49 +0000 (15:46 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 7 Feb 2023 09:15:13 +0000 (10:15 +0100)
commitc2891b5d3c10d29c9d882d367774d9eb5abc3fe3
tree4a0a900fbd00e2598a8dbcc728f39db0caadd21e
parent790b738ddad6cdc54e897ab7b89208e15394b489
rpcd-mod-luci: fix reporting network device flags

Fix reporting of ceertain flag values larger than 255, such as IFF_PROMISC
by explicitly casting the bit test expression to a boolean result since
the implicit integer truncation to uint8_t will turn the `0x100` result of
a set IFF_PROMISC bit into just `0x0`.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a570e300061fae7250999c35e4e7215940bca82d)
libs/rpcd-mod-luci/src/luci.c