diff options
author | Donald Sharp <sharpd@nvidia.com> | 2021-10-13 20:32:52 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2021-10-13 20:32:52 +0200 |
commit | 2beaba8de9630b3bff2abdf1381295667d051302 (patch) | |
tree | 144534760d7ebbe33ad88524a85b26defdc8d2b4 /isisd/isis_snmp.c | |
parent | Merge pull request #9819 from donaldsharp/deprecation_python (diff) | |
download | frr-2beaba8de9630b3bff2abdf1381295667d051302.tar.xz frr-2beaba8de9630b3bff2abdf1381295667d051302.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | isisd/isis_snmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/isisd/isis_snmp.c b/isisd/isis_snmp.c index c530eb916..1b78dc0be 100644 --- a/isisd/isis_snmp.c +++ b/isisd/isis_snmp.c @@ -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); } |