diff options
author | haohuang <haohuang@codeaurora.org> | 2021-01-04 17:41:31 +0800 |
---|---|---|
committer | haohuang <haohuang@codeaurora.org> | 2021-01-04 17:41:31 +0800 |
commit | 7cd16d52eb210a6efbbbd9d51d4adcd8c048d746 (patch) | |
tree | f70a47a2a46ce710ab5620b21d7c272549ddfaae /core/LocApiBase.h | |
parent | 5c0b4cdce579822ba1b9cee31eca8a14e0a0124d (diff) |
Fix one mul-overflow issue
When minInterval is set to 5s or larger,
mul-overflow will happen when we convert
minInterval from second to nano second in
getElapsedRealtimeEstimateNanos function.
Change the type of time between fix parameter
to int64_t.
Change-Id: Ifbe180b35298b78099daf496354086d5e3403e7b
CRs-Fixed: 2848319
Diffstat (limited to 'core/LocApiBase.h')
-rw-r--r-- | core/LocApiBase.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/LocApiBase.h b/core/LocApiBase.h index b58e60d..121f795 100644 --- a/core/LocApiBase.h +++ b/core/LocApiBase.h @@ -359,7 +359,7 @@ public: ElapsedRealtimeEstimator(int64_t travelTimeNanosEstimate): mInitialTravelTime(travelTimeNanosEstimate) {reset();} int64_t getElapsedRealtimeEstimateNanos(int64_t curDataTimeNanos, - bool isCurDataTimeTrustable, uint32_t tbf); + bool isCurDataTimeTrustable, int64_t tbf); inline int64_t getElapsedRealtimeUncNanos() { return 5000000;} void reset(); |