diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-11-03 12:40:40 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-11-11 14:58:35 +0300 |
| commit | ac716cdffdc4abc5e51e4cfe723952f025c497b4 (patch) | |
| tree | 7964df328c947e15a7fcafb6bf33f96380e90a50 /isisd/isis_snmp.c | |
| parent | 0ac8055ca1a9662d6e8197dff9a91759331991e7 (diff) | |
isisd: use time_t for last update and last flap
These variables are only assigned with time() which returns time_t.
This should also fix occasional CI build failures because of comparisons
of signed and unsigned integers.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'isisd/isis_snmp.c')
| -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 1b78dc0be6..c530eb9169 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 < ((time_t)adj->last_upd + (time_t)adj->hold_time)) + if (val < (adj->last_upd + adj->hold_time)) return SNMP_INTEGER(adj->last_upd + adj->hold_time - val); } |
