mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 23:15:37 +00:00
Minor code readability improvement in mqtt.c
(cherry picked from commit 5c58e25de5
)
This commit is contained in:
parent
d860dd7655
commit
7ba2633ef0
@ -681,7 +681,7 @@ mqtt_message_received(mqtt_client_t *client, u8_t fixed_hdr_idx, u16_t length, u
|
||||
topic = var_hdr_payload + 2;
|
||||
after_topic = 2 + topic_len;
|
||||
/* Check length, add one byte even for QoS 0 so that zero termination will fit */
|
||||
if ((after_topic + qos ? 2 : 1) > length) {
|
||||
if ((after_topic + (qos? 2 : 1)) > length) {
|
||||
LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: Receive buffer can not fit topic + pkt_id\n"));
|
||||
goto out_disconnect;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user