From: Aviv Heller <[email protected]>

Use an unsigned type instead.

Signed-off-by: Aviv Heller <[email protected]>
---
 programs/pluto/kernel_netlink.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/programs/pluto/kernel_netlink.c b/programs/pluto/kernel_netlink.c
index b12d19b..c8f7bfd 100644
--- a/programs/pluto/kernel_netlink.c
+++ b/programs/pluto/kernel_netlink.c
@@ -96,14 +96,14 @@
 /* Minimum priority number in SPD used by pluto. */
 #define MIN_SPD_PRIORITY 1024
 
-#define NIC_OFFLOAD_UNKNOWN (-2)
-#define NIC_OFFLOAD_UNSUPPORTED (-1)
+#define NIC_OFFLOAD_UNKNOWN     (UINT_MAX)
+#define NIC_OFFLOAD_UNSUPPORTED (UINT_MAX - 1)
 
 static int netlinkfd = NULL_FD;
 static int netlink_bcast_fd = NULL_FD;
 
 #ifdef USE_NIC_OFFLOAD
-static int netlink_esp_hw_offload = NIC_OFFLOAD_UNKNOWN;
+static unsigned int netlink_esp_hw_offload = NIC_OFFLOAD_UNKNOWN;
 #endif
 
 #define NE(x) { x, #x }        /* Name Entry -- shorthand for sparse_names */
-- 
1.8.3.1

_______________________________________________
Swan-dev mailing list
[email protected]
https://lists.libreswan.org/mailman/listinfo/swan-dev

Reply via email to