Skip to content

Commit 8e9f06d

Browse files
Fix usage of MQTT_TRACE_ERROR
1 parent a98ef95 commit 8e9f06d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/mqtt_sn_packet.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ int SN_Decode_Header(byte *rx_buf, int rx_buf_len,
132132
case SN_MSG_TYPE_REGACK:
133133
case SN_MSG_TYPE_PUBACK:
134134
if (rx_buf_len < 3) {
135-
MQTT_TRACE_ERROR(MQTT_CODE_ERROR_BAD_ARG);
135+
return MQTT_TRACE_ERROR(MQTT_CODE_ERROR_BAD_ARG);
136136
}
137137
/* octet 4-5 */
138138
rc = MqttDecode_Num(rx_buf + 2, p_packet_id,
@@ -154,7 +154,7 @@ int SN_Decode_Header(byte *rx_buf, int rx_buf_len,
154154
break;
155155
case SN_MSG_TYPE_SUBACK:
156156
if (rx_buf_len < 4) {
157-
MQTT_TRACE_ERROR(MQTT_CODE_ERROR_BAD_ARG);
157+
return MQTT_TRACE_ERROR(MQTT_CODE_ERROR_BAD_ARG);
158158
}
159159
/* octet 5-6 */
160160
rc = MqttDecode_Num(rx_buf + 3, p_packet_id,

0 commit comments

Comments
 (0)