Fix incorrect cast to avoid integer overflow

Fix incorrect cast in converting time uncertainty
from integer based source to float.

Change-Id: Ibb75eb1a2d925a7e7ce13275f09a618f241c31bf
CRs-Fixed: 2157401
This commit is contained in:
Katz Yamada 2017-12-12 16:58:55 -08:00 committed by Gerrit - the friendly Code Review server
parent 53a1aa5ed5
commit f3f7a4bf41

View file

@ -3015,8 +3015,8 @@ bool GnssAdapter::getDebugReport(GnssDebugReport& r)
(int64_t)(reports.mTimeAndClock.back().mGpsTowMs);
r.mTime.timeUncertaintyNs =
(float)((reports.mTimeAndClock.back().mTimeUnc +
reports.mTimeAndClock.back().mLeapSecUnc)*1000);
((float)(reports.mTimeAndClock.back().mTimeUnc) +
(float)(reports.mTimeAndClock.back().mLeapSecUnc))*1000.0f;
r.mTime.frequencyUncertaintyNsPerSec =
(float)(reports.mTimeAndClock.back().mClockFreqBiasUnc);
LOC_LOGV("getDebugReport - timeestimate=%" PRIu64 " unc=%f frequnc=%f",