mirror of https://github.com/FRRouting/frr.git
isisd: Convert signed to time_t for addition
Convert a signed value to a time_t before addition so that we can compare unsigned (time_t) to unsigned. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
c9adeefcfa
commit
2beaba8de9
|
@ -2571,7 +2571,7 @@ static uint8_t *isis_snmp_find_isadj(struct variable *v, oid *name,
|
|||
*/
|
||||
if (adj->last_upd != 0) {
|
||||
val = time(NULL);
|
||||
if (val < (adj->last_upd + adj->hold_time))
|
||||
if (val < ((time_t)adj->last_upd + (time_t)adj->hold_time))
|
||||
return SNMP_INTEGER(adj->last_upd
|
||||
+ adj->hold_time - val);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue