From 0b5ed977855050a446450a76f24a7b829cd65ed0 Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Wed, 6 Feb 2019 16:15:49 +0100 Subject: [PATCH] net: mqtt: Remove explicit numeration of transport enum The transport number is used to pick elements of an array which is initialized using #if defined macros. Having explicit numeration in this enum leads to situations where the array index is different than the enum value. Signed-off-by: Tomasz Gorochowik --- include/net/mqtt.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/net/mqtt.h b/include/net/mqtt.h index 5f5cab73c3e..2fd63885372 100644 --- a/include/net/mqtt.h +++ b/include/net/mqtt.h @@ -341,17 +341,17 @@ struct mqtt_sec_config { /** @brief MQTT transport type. */ enum mqtt_transport_type { /** Use non secure TCP transport for MQTT connection. */ - MQTT_TRANSPORT_NON_SECURE = 0x00, + MQTT_TRANSPORT_NON_SECURE, #if defined(CONFIG_MQTT_LIB_TLS) /** Use secure TCP transport (TLS) for MQTT connection. */ - MQTT_TRANSPORT_SECURE = 0x01, + MQTT_TRANSPORT_SECURE, #endif /* CONFIG_MQTT_LIB_TLS */ /** Shall not be used as a transport type. * Indicator of maximum transport types possible. */ - MQTT_TRANSPORT_NUM = 0x02 + MQTT_TRANSPORT_NUM }; /** @brief MQTT transport specific data. */