1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

Fix defects detected by Coverity Scan

This commit is contained in:
Carles Fernandez 2019-02-14 23:44:38 +01:00
parent b5c59ee6f7
commit 890752601d
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ void beidou_b1i_code_gen_int(int32_t* _dest, int32_t _prn, uint32_t _chip_shift)
prn_idx = _prn - 1;
/* A simple error check */
if ((prn_idx < 0) || (prn_idx > 51))
if ((prn_idx < 0) || (prn_idx > 32))
{
return;
}

View File

@ -831,7 +831,7 @@ int32_t Beidou_Dnav_Navigation_Message::d2_subframe_decoder(std::string const& s
d_eccentricity_msb = static_cast<double>(read_navigation_unsigned(subframe_bits, D2_E_MSB));
d_eccentricity_msb_bits = (read_navigation_unsigned(subframe_bits, D2_E_MSB));
// Adjust for lsb in next page (shift number of lsb to the left)
d_eccentricity_msb = static_cast<double>((static_cast<int>(d_eccentricity_msb) << 22));
d_eccentricity_msb = d_eccentricity_msb << 22;
d_eccentricity_msb_bits = d_eccentricity_msb_bits << 22;
// Set system flags for message reception