mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge #19739
19739: gnrc/rpl: fix incorrect addition overflow check r=maribu a=szsam Co-authored-by: Mingjie Shen <shen497@purdue.edu>
This commit is contained in:
commit
1bed7dde15
@ -69,7 +69,7 @@ uint16_t calc_rank(gnrc_rpl_dodag_t *dodag, uint16_t base_rank)
|
||||
add = CONFIG_GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE;
|
||||
}
|
||||
|
||||
if ((base_rank + add) < base_rank) {
|
||||
if ((uint16_t)(base_rank + add) < base_rank) {
|
||||
return GNRC_RPL_INFINITE_RANK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user