Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e793f836 authored by Hu Wang's avatar Hu Wang Committed by Gabriel Biren
Browse files

Fix sub-underfow when converting scan result's age from ms to us

Commit 5a441fcf ('Fix mul-overflow when converting scan result's
age from ms to us') fixes mul-overflow, but still sub-underflow
can happen in same line due to data type is u64, fix this by
moving check to earlier lines to ensure the sub does not results
in a negative value.

Bug: 387187200
Test: m
Change-Id: I81035e749d627fa3a7901b672241488963f3e046
parent eaabd037
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment