From dea0511659b41ccc9abd0b8a61f03c887b85ea3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kim=20B=C3=B8ndergaard?= Date: Wed, 29 Jan 2020 15:25:22 +0100 Subject: [PATCH] net: mqtt: struct mqtt_sec_config: Declare hostname with const MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The hostname member of struct mqtt_sec_config is used as optval argument to ztls_sesockopt_ctx(). optval is declared as const void* so no need to limit hostname to not allow const variables Signed-off-by: Kim Bøndergaard --- include/net/mqtt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/mqtt.h b/include/net/mqtt.h index 7e0283c1498..9f234fa85f1 100644 --- a/include/net/mqtt.h +++ b/include/net/mqtt.h @@ -338,7 +338,7 @@ struct mqtt_sec_config { /** Peer hostname for ceritificate verification. * May be NULL to skip hostname verification. */ - char *hostname; + const char *hostname; }; /** @brief MQTT transport type. */