mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-04-10 02:02:21 +02:00
OP-667: This is not an issue since the 2 callers already check for NULL pointer but for consistency, this should be done in the function itself.
This commit is contained in:
parent
5ac1f33c47
commit
40b0682048
@ -249,6 +249,7 @@ static bool NMEA_parse_real(int32_t *whole, uint32_t *fract, uint8_t *fract_unit
|
|||||||
PIOS_DEBUG_Assert(whole);
|
PIOS_DEBUG_Assert(whole);
|
||||||
PIOS_DEBUG_Assert(fract);
|
PIOS_DEBUG_Assert(fract);
|
||||||
PIOS_DEBUG_Assert(fract_units);
|
PIOS_DEBUG_Assert(fract_units);
|
||||||
|
PIOS_DEBUG_Assert(field);
|
||||||
|
|
||||||
field_w = strsep(&s, ".");
|
field_w = strsep(&s, ".");
|
||||||
field_f = s;
|
field_f = s;
|
||||||
@ -274,9 +275,6 @@ static float NMEA_real_to_float(char *nmea_real)
|
|||||||
uint32_t fract;
|
uint32_t fract;
|
||||||
uint8_t fract_units;
|
uint8_t fract_units;
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
PIOS_DEBUG_Assert(nmea_real);
|
|
||||||
|
|
||||||
if (!NMEA_parse_real(&whole, &fract, &fract_units, nmea_real)) {
|
if (!NMEA_parse_real(&whole, &fract, &fract_units, nmea_real)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user