diff --git a/include/zenoh-pico/transport/raweth/config.h b/include/zenoh-pico/transport/raweth/config.h index 01771ab99..4dc7c3c1c 100644 --- a/include/zenoh-pico/transport/raweth/config.h +++ b/include/zenoh-pico/transport/raweth/config.h @@ -17,10 +17,10 @@ #include +#include "zenoh-pico/protocol/core.h" #include "zenoh-pico/system/link/raweth.h" #include "zenoh-pico/transport/transport.h" #include "zenoh-pico/utils/result.h" -#include "zenoh-pico/protocol/core.h" #if Z_FEATURE_RAWETH_TRANSPORT == 1 diff --git a/include/zenoh-pico/utils/result.h b/include/zenoh-pico/utils/result.h index 19b808075..514473947 100644 --- a/include/zenoh-pico/utils/result.h +++ b/include/zenoh-pico/utils/result.h @@ -16,7 +16,7 @@ #define ZENOH_PICO_UTILS_RESULT_H #define _ZP_UNUSED(x) (void)(x) -#define _ZP_ARRAY_SIZE(array) (sizeof(array)/sizeof(array[0])) +#define _ZP_ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) #define _Z_ERR_MESSAGE_MASK 0x88 #define _Z_ERR_ENTITY_MASK 0x90 diff --git a/src/transport/raweth/config.c b/src/transport/raweth/config.c index 9b73422ac..4548c45df 100644 --- a/src/transport/raweth/config.c +++ b/src/transport/raweth/config.c @@ -21,9 +21,9 @@ const uint8_t _ZP_RAWETH_CFG_SMAC[_ZP_MAC_ADDR_LENGTH] = {0x30, 0x03, 0xc8, 0x37 // Should be generated const _zp_raweth_cfg_entry _ZP_RAWETH_CFG_ARRAY[] = { - {{0, {0}, ""}, 0x00, {0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}, false}, // Default mac addr - {{0, {0},"some/key/expr"}, 0x8c, {0x00, 0x11, 0x22, 0x33, 0x44, 0x55}, true}, // entry1 - {{0, {0},"another/keyexpr"}, 0x43, {0x01, 0x23, 0x45, 0x67, 0x89, 0xab}, true}, // entry2 + {{0, {0}, ""}, 0x00, {0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}, false}, // Default mac addr + {{0, {0}, "some/key/expr"}, 0x8c, {0x00, 0x11, 0x22, 0x33, 0x44, 0x55}, true}, // entry1 + {{0, {0}, "another/keyexpr"}, 0x43, {0x01, 0x23, 0x45, 0x67, 0x89, 0xab}, true}, // entry2 }; // Don't modify diff --git a/src/transport/raweth/tx.c b/src/transport/raweth/tx.c index f5186dacf..f4155ef74 100644 --- a/src/transport/raweth/tx.c +++ b/src/transport/raweth/tx.c @@ -225,17 +225,17 @@ int8_t _z_raweth_send_n_msg(_z_session_t *zn, const _z_network_message_t *n_msg, switch (n_msg->_tag) { case _Z_N_PUSH: keyexpr = &n_msg->_body._push._key; - break; + break; case _Z_N_REQUEST: keyexpr = &n_msg->_body._request._key; - break; + break; case _Z_N_RESPONSE: keyexpr = &n_msg->_body._response._key; - break; + break; case _Z_N_RESPONSE_FINAL: case _Z_N_DECLARE: default: - break; + break; } // Set socket info _zp_raweth_set_socket(keyexpr, &ztm->_link._socket._raweth);