EKF: remove use of memset to initialise variable

When using a union of flags and integer value it is safer to initialise the value to 0 rather than memset the flags because the flags may not define all bits in the integer.
This commit is contained in:
Paul Riseborough
2017-03-21 07:57:23 +11:00
parent 9ddfd66d01
commit 2426f1dd3a
+1 -1
View File
@@ -435,7 +435,7 @@ bool EstimatorInterface::initialise_interface(uint64_t timestamp)
_time_last_range = 0;
_time_last_airspeed = 0;
_time_last_optflow = 0;
memset(&_fault_status.flags, 0, sizeof(_fault_status.flags));
_fault_status.value = 0;
_time_last_ext_vision = 0;
return true;
}