Commit 1e73fcd
committed
Use uint8_t in RTC BCD conversion helpers
Update `BCD2DEC` and `DEC2BCD` in `hwclockrtc.cpp` to return `uint8_t` and use explicit `static_cast<uint8_t>`/unsigned literals in the math. This tightens type safety for RTC BCD conversions and avoids implicit signed-integer behavior.1 parent fb94154 commit 1e73fcd
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
0 commit comments