-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include: sys: time_units: fix 32-bit near conversion for overflow
Adjusting the input value to allow round to nearest can cause an overflow which invalidates the expectation that the 32-bit result is the low 32 bits of the 64-bit result. If the adjustment overflows do the full-precision conversion and truncate in the caller. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
- Loading branch information
1 parent
7ff3f8a
commit 76d8f8f
Showing
2 changed files
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters