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:
Donald Sharp 2021-10-13 14:32:52 -04:00
parent c9adeefcfa
commit 2beaba8de9
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}