Skip to content

Commit 5d47e86

Browse files
author
Ian Craggs
committed
Fix C++ style loop init
1 parent efadb74 commit 5d47e86

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

MQTTClient-C/src/MQTTClient.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,9 @@ int keepalive(MQTTClient* c)
235235

236236
void MQTTCleanSession(MQTTClient* c)
237237
{
238-
for (int i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
238+
int i = 0;
239+
240+
for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
239241
c->messageHandlers[i].topicFilter = NULL;
240242
}
241243

0 commit comments

Comments
 (0)