From 7735ded57fbb5834efc2f6185fb668ec70923e7f Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Sat, 11 Jul 2026 13:59:01 +0200 Subject: zwei Topics, überflüssige Variable entfernt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mqtt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/mqtt.c') diff --git a/src/mqtt.c b/src/mqtt.c index 5a8bfc0..be4b9d2 100644 --- a/src/mqtt.c +++ b/src/mqtt.c @@ -49,10 +49,8 @@ mqtt_handle_messages(struct mosquitto *client, mosquitto_message_callback_set(client, callback); } - int *mid = NULL; - for ( size_t idx = 0; topics[idx] != NULL; ++idx ) { - mosquitto_subscribe(client, mid, topics[idx], 0); + mosquitto_subscribe(client, NULL, topics[idx], 0); } while ( !*quit ) { @@ -67,7 +65,7 @@ mqtt_handle_messages(struct mosquitto *client, } for ( size_t idx = 0; topics[idx] != NULL; ++idx ) { - mosquitto_unsubscribe(client, mid, topics[idx]); + mosquitto_unsubscribe(client, NULL, topics[idx]); } } -- cgit v1.3