From: Aviv Heller <[email protected]> Cast to unsigned before shift.
Signed-off-by: Aviv Heller <[email protected]> --- v1 -> v2: - Cast to unsigned instead of changing the type and values. --- programs/pluto/kernel_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/pluto/kernel_netlink.c b/programs/pluto/kernel_netlink.c index 0ed4e31..3c07b52 100644 --- a/programs/pluto/kernel_netlink.c +++ b/programs/pluto/kernel_netlink.c @@ -919,7 +919,7 @@ static enum iface_nic_offload netlink_detect_offload(const char *ifname) /* Feature is supported by kernel. Query device features */ blocks = (netlink_esp_hw_offload + 31) / 32; - feature_bit = 1 << (netlink_esp_hw_offload % 31); + feature_bit = 1 << ((unsigned int)netlink_esp_hw_offload % 31); cmd = alloc_bytes(sizeof(*cmd) + sizeof(cmd->features[0]) * blocks, "ethtool_gfeatures"); jam_str(ifr.ifr_name, sizeof(ifr.ifr_name), ifname); -- 1.8.3.1 _______________________________________________ Swan-dev mailing list [email protected] https://lists.libreswan.org/mailman/listinfo/swan-dev
