mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 12:40:35 +00:00
Fix defects detected by Coverity Scan
This commit is contained in:
parent
b5c59ee6f7
commit
890752601d
@ -57,7 +57,7 @@ void beidou_b1i_code_gen_int(int32_t* _dest, int32_t _prn, uint32_t _chip_shift)
|
|||||||
prn_idx = _prn - 1;
|
prn_idx = _prn - 1;
|
||||||
|
|
||||||
/* A simple error check */
|
/* A simple error check */
|
||||||
if ((prn_idx < 0) || (prn_idx > 51))
|
if ((prn_idx < 0) || (prn_idx > 32))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -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 = static_cast<double>(read_navigation_unsigned(subframe_bits, D2_E_MSB));
|
||||||
d_eccentricity_msb_bits = (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)
|
// 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;
|
d_eccentricity_msb_bits = d_eccentricity_msb_bits << 22;
|
||||||
|
|
||||||
// Set system flags for message reception
|
// Set system flags for message reception
|
||||||
|
Loading…
Reference in New Issue
Block a user