summaryrefslogtreecommitdiffstats
path: root/isisd/isis_snmp.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-10-13 20:32:52 +0200
committerDonald Sharp <sharpd@nvidia.com>2021-10-13 20:32:52 +0200
commit2beaba8de9630b3bff2abdf1381295667d051302 (patch)
tree144534760d7ebbe33ad88524a85b26defdc8d2b4 /isisd/isis_snmp.c
parentMerge pull request #9819 from donaldsharp/deprecation_python (diff)
downloadfrr-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.c2
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);
}