From 5c58e25de583f7f7c1a5d6e29ba5ade91a089514 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sun, 15 Jan 2017 09:22:13 +0100 Subject: [PATCH] Minor code readability improvement in mqtt.c --- src/apps/mqtt/mqtt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/mqtt/mqtt.c b/src/apps/mqtt/mqtt.c index 2efd85fa..3d37ec73 100644 --- a/src/apps/mqtt/mqtt.c +++ b/src/apps/mqtt/mqtt.c @@ -635,7 +635,7 @@ mqtt_incomming_suback(struct mqtt_request_t *r, u8_t result) * @param remaining_length Remaining length of complete message */ static mqtt_connection_status_t -mqtt_message_received(mqtt_client_t *client, u8_t fixed_hdr_idx, u16_t length, u32_t remaining_length) + mqtt_message_received(mqtt_client_t *client, u8_t fixed_hdr_idx, u16_t length, u32_t remaining_length) { mqtt_connection_status_t res = MQTT_CONNECT_ACCEPTED; @@ -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; }