mirror of
https://github.com/espressif/esp-mqtt.git
synced 2025-07-30 10:48:06 +02:00
remove unused variable
This commit is contained in:
committed by
David Čermák
parent
d3d816ed24
commit
f83d2a9111
@ -198,17 +198,14 @@ bool mqtt_header_complete(uint8_t *buffer, size_t buffer_length)
|
|||||||
char *mqtt_get_publish_topic(uint8_t *buffer, size_t *length)
|
char *mqtt_get_publish_topic(uint8_t *buffer, size_t *length)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int totlen = 0;
|
|
||||||
int topiclen;
|
int topiclen;
|
||||||
|
|
||||||
for (i = 1; i < *length; ++i) {
|
for (i = 1; i < *length; ++i) {
|
||||||
totlen += (buffer[i] & 0x7f) << (7 * (i - 1));
|
|
||||||
if ((buffer[i] & 0x80) == 0) {
|
if ((buffer[i] & 0x80) == 0) {
|
||||||
++i;
|
++i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
totlen += i;
|
|
||||||
|
|
||||||
if (i + 2 >= *length) {
|
if (i + 2 >= *length) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user