From 5d47e86da8e191c067f3124985465d79f2e8e2f5 Mon Sep 17 00:00:00 2001 From: Ian Craggs Date: Thu, 13 Jul 2017 13:07:45 +0100 Subject: [PATCH] Fix C++ style loop init --- MQTTClient-C/src/MQTTClient.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MQTTClient-C/src/MQTTClient.c b/MQTTClient-C/src/MQTTClient.c index 73edad7f..f7a1bd1a 100755 --- a/MQTTClient-C/src/MQTTClient.c +++ b/MQTTClient-C/src/MQTTClient.c @@ -235,7 +235,9 @@ int keepalive(MQTTClient* c) void MQTTCleanSession(MQTTClient* c) { - for (int i = 0; i < MAX_MESSAGE_HANDLERS; ++i) + int i = 0; + + for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) c->messageHandlers[i].topicFilter = NULL; }