Basic C library for MQTT packet serialization and deserialization
Dependents: MQTT MQTT MQTT MQTT ... more
Fork of MQTTPacket by
This library is part of the EclipseTM Paho project; specifically the embedded client.
A basic MQTT library in C for packet serialization and deserialization
Diff: MQTTSubscribeClient.c
- Revision:
- 17:c5bd28cc139a
- Parent:
- 16:d0b3886ada32
--- a/MQTTSubscribeClient.c Fri Aug 01 16:58:18 2014 +0000 +++ b/MQTTSubscribeClient.c Fri Aug 01 17:25:52 2014 +0000 @@ -51,7 +51,7 @@ MQTTString topicFilters[], int requestedQoSs[]) { unsigned char *ptr = buf; - MQTTHeader header; + MQTTHeader header = {0}; int rem_len = 0; int rc = 0; int i = 0; @@ -99,7 +99,7 @@ */ int MQTTDeserialize_suback(unsigned short* packetid, int maxcount, int* count, int grantedQoSs[], unsigned char* buf, int buflen) { - MQTTHeader header; + MQTTHeader header = {0}; unsigned char* curdata = buf; unsigned char* enddata = NULL; int rc = 0;