diff --git a/include/zenoh-pico/protocol/definitions/network.h b/include/zenoh-pico/protocol/definitions/network.h index 122f09aba..2f2f838c9 100644 --- a/include/zenoh-pico/protocol/definitions/network.h +++ b/include/zenoh-pico/protocol/definitions/network.h @@ -87,10 +87,13 @@ static inline _z_qos_t _z_n_qos_create(bool express, z_congestion_control_t cong return ret; } static inline z_priority_t _z_n_qos_get_priority(_z_n_qos_t n_qos) { - return (z_priority_t)(n_qos._val & 0x07 /* 0b111 */); + z_priority_t ret = n_qos._val & 0x07; // 0b0111 + return ret; } static inline z_congestion_control_t _z_n_qos_get_congestion_control(_z_n_qos_t n_qos) { - return (n_qos._val & 0x08 /* 0b1000 */) ? Z_CONGESTION_CONTROL_BLOCK : Z_CONGESTION_CONTROL_DROP; + z_congestion_control_t ret = + (n_qos._val & 0x08) ? Z_CONGESTION_CONTROL_BLOCK : Z_CONGESTION_CONTROL_DROP; // 0b1000 + return ret; } static inline bool _z_n_qos_get_express(_z_n_qos_t n_qos) { return (bool)(n_qos._val & 0x10 /* 0b10000 */); } #define _z_n_qos_make(express, nodrop, priority) \