block.c: Clarify ignored result from coap_get_data()

Addresses CID 1520612.
This commit is contained in:
Olaf Bergmann committed 2022-08-23 10:49:15 +02:00
1 parent 5f0eea8dbb
commit 2755af4d1a
1 file changed
+2 -1
+2 -1
View File
@@ -2061,7 +2061,8 @@ coap_handle_response_get_block(coap_context_t *context,
coap_decode_var_bytes(coap_opt_value(size_opt),
coap_opt_length(size_opt)) : 0;
coap_get_data(rcvd, &length, &data);
/* length and data are cleared on error */
(void)coap_get_data(rcvd, &length, &data);
rcvd->body_offset = 0;
rcvd->body_total = length;
if (coap_get_block_b(session, rcvd, COAP_OPTION_BLOCK2, &block)) {