A small footprint MQTT library
Dependents: STM32F746_iothub_client_sample_mqtt FXOS8700CQ_To_Azure_IoT f767zi_mqtt FXOS8700CQ_To_Azure_IoT ... more
Diff: mqtt_client.c
- Revision:
- 12:30b08cda82fd
- Parent:
- 11:a0a6a4cf7812
- Child:
- 13:3c202001e4ba
diff -r a0a6a4cf7812 -r 30b08cda82fd mqtt_client.c --- a/mqtt_client.c Fri Jan 13 18:40:50 2017 -0800 +++ b/mqtt_client.c Tue Jan 24 15:24:05 2017 -0800 @@ -257,7 +257,8 @@ getLogTime(tmBuffer, TIME_MAX_BUFFER); LOG(AZ_LOG_TRACE, 0, "-> %s %s: ", tmBuffer, retrievePacketType((unsigned char)data[0])); - for (size_t index = 0; index < length; index++) + size_t index = 0; + for (index = 0; index < length; index++) { LOG(AZ_LOG_TRACE, 0, "0x%02x ", data[index]); } @@ -288,7 +289,8 @@ getLogTime(tmBuffer, TIME_MAX_BUFFER); LOG(AZ_LOG_TRACE, 0, "<- %s %s: 0x%02x 0x%02x ", tmBuffer, retrievePacketType((CONTROL_PACKET_TYPE)packet), (unsigned char)(packet | flags), length); - for (size_t index = 0; index < length; index++) + size_t index = 0; + for (index = 0; index < length; index++) { LOG(AZ_LOG_TRACE, 0, "0x%02x ", data[index]); }