summaryrefslogtreecommitdiffstats
path: root/lib/spf_backoff.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-08-26 01:14:25 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-08-26 01:46:40 +0200
commita97986ffba560458b2b1e88b09b31822f78d8542 (patch)
tree49ae3ae301d7e1052d69fe0884a565897ca65576 /lib/spf_backoff.c
parentMerge pull request #1045 from opensourcerouting/clippy-coverity (diff)
downloadfrr-a97986ffba560458b2b1e88b09b31822f78d8542.tar.xz
frr-a97986ffba560458b2b1e88b09b31822f78d8542.zip
*: fix compiler warnings
Specifically, gcc 4.2.1 on OpenBSD 6.0 warns about these; they're bogus (gcc 4.2, being rather old, isn't quite as "intelligent" as newer versions; the newer ones apply more logic and less warnings.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/spf_backoff.c')
-rw-r--r--lib/spf_backoff.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/spf_backoff.c b/lib/spf_backoff.c
index d075e70d4..92b7620ed 100644
--- a/lib/spf_backoff.c
+++ b/lib/spf_backoff.c
@@ -226,8 +226,9 @@ void spf_backoff_show(struct spf_backoff *backoff, struct vty *vty,
if (backoff->t_holddown) {
struct timeval remain =
thread_timer_remain(backoff->t_holddown);
- vty_out(vty, "%s Still runs for %ld msec\n",
- prefix, remain.tv_sec * 1000 + remain.tv_usec / 1000);
+ vty_out(vty, "%s Still runs for %lld msec\n",
+ prefix, (long long)remain.tv_sec * 1000
+ + remain.tv_usec / 1000);
} else {
vty_out(vty, "%s Inactive\n", prefix);
}
@@ -237,8 +238,9 @@ void spf_backoff_show(struct spf_backoff *backoff, struct vty *vty,
if (backoff->t_timetolearn) {
struct timeval remain =
thread_timer_remain(backoff->t_timetolearn);
- vty_out(vty, "%s Still runs for %ld msec\n",
- prefix, remain.tv_sec * 1000 + remain.tv_usec / 1000);
+ vty_out(vty, "%s Still runs for %lld msec\n",
+ prefix, (long long)remain.tv_sec * 1000
+ + remain.tv_usec / 1000);
} else {
vty_out(vty, "%s Inactive\n", prefix);
}