From ae0196cb0b6eb2cfce13f55f326d5a900802809e Mon Sep 17 00:00:00 2001 From: Jean-Roland Date: Wed, 13 Dec 2023 15:11:49 +0100 Subject: [PATCH] fix: don't memorize first encode return --- src/transport/raweth/tx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/transport/raweth/tx.c b/src/transport/raweth/tx.c index 68f254c2f..079a5e0b6 100644 --- a/src/transport/raweth/tx.c +++ b/src/transport/raweth/tx.c @@ -256,8 +256,7 @@ int8_t _z_raweth_send_n_msg(_z_session_t *zn, const _z_network_message_t *n_msg, // Encode the frame header _Z_RETURN_IF_ERR(_z_transport_message_encode(&ztm->_wbuf, &t_msg)); // Encode the network message - ret = _z_network_message_encode(&ztm->_wbuf, n_msg); - if (ret == _Z_RES_OK) { + if (_z_network_message_encode(&ztm->_wbuf, n_msg) == _Z_RES_OK) { // Write the eth header _Z_RETURN_IF_ERR(__unsafe_z_raweth_write_header(&ztm->_link, &ztm->_wbuf)); // Send the wbuf on the socket