From d5df0d6149ff118351de25bae0fbf6f23df953d4 Mon Sep 17 00:00:00 2001 From: Lee Duncan Date: Fri, 27 Aug 2021 13:20:23 -0700 Subject: Change iscsi IP type from defines to enum. This lets the compiler help us find errors, if any. Change the declaration and usage to match. Simplify the function that decides, while we are at it. Should be no functional change. --- include/iscsi_if.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/iscsi_if.h b/include/iscsi_if.h index 5a1c614..22b7c09 100644 --- a/include/iscsi_if.h +++ b/include/iscsi_if.h @@ -393,8 +393,11 @@ struct iscsi_path { #define ISCSI_IPV6_ROUTER_AUTOCFG_ENABLE 0x01 #define ISCSI_IPV6_ROUTER_AUTOCFG_DISABLE 0x02 -#define ISCSI_IFACE_TYPE_IPV4 0x01 -#define ISCSI_IFACE_TYPE_IPV6 0x02 +/* Interface IP Type */ +enum iscsi_iface_type { + ISCSI_IFACE_TYPE_IPV4 = 1, + ISCSI_IFACE_TYPE_IPV6, +}; #define ISCSI_MAX_VLAN_ID 4095 #define ISCSI_MAX_VLAN_PRIORITY 7 -- cgit v1.2.1