From f7c14e3041cc4757d54e7380b3f5d17396e01255 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 25 May 2023 07:53:11 +0200 Subject: [PATCH] Remove comparisons that are always true --- src/core/libs/osnma_msg_receiver.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/libs/osnma_msg_receiver.cc b/src/core/libs/osnma_msg_receiver.cc index 759c2db0b..0baedb6a1 100644 --- a/src/core/libs/osnma_msg_receiver.cc +++ b/src/core/libs/osnma_msg_receiver.cc @@ -233,7 +233,7 @@ void osnma_msg_receiver::read_dsm_block(const std::shared_ptr& osnma_ // Get number of blocks in message uint8_t nb = (osnma_msg->hkroot[2] & 0b11110000) >> 4; uint16_t number_of_blocks = 0; - if (d_osnma_data.d_dsm_header.dsm_id >= 0 && d_osnma_data.d_dsm_header.dsm_id < 12) + if (d_osnma_data.d_dsm_header.dsm_id < 12) { // Table 3 const auto it = OSNMA_TABLE_3.find(nb); @@ -274,7 +274,7 @@ void osnma_msg_receiver::read_dsm_block(const std::shared_ptr& osnma_ void osnma_msg_receiver::process_dsm_message(const std::shared_ptr& osnma_msg, const std::vector& dsm_msg) { - if (d_osnma_data.d_dsm_header.dsm_id >= 0 && d_osnma_data.d_dsm_header.dsm_id < 12) + if (d_osnma_data.d_dsm_header.dsm_id < 12) { // DSM-KROOT message d_osnma_data.d_dsm_kroot_message.nb_dk = (dsm_msg[0] & 0b11110000) >> 4;