diff options
-rw-r--r-- | ospfd/ChangeLog | 7 | ||||
-rw-r--r-- | ospfd/ospf_dump.c | 4 | ||||
-rw-r--r-- | ospfd/ospf_spf.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_vty.c | 2 |
4 files changed, 9 insertions, 6 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index a8ce2f54..7b77cb4e 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -1,3 +1,8 @@ +2005-11-04 Paul Jakma <paul.jakma@sun.com> + + * ospf_{dump,spf,vty}.c: Oops, use the internal tv_sub + function rather than unportable timersub. + 2005-11-03 Paul Jakma <paul.jakma@sun.com> * ospf_apiserver.c: (apiserver_sync_callback) stray semi-colon @@ -6,7 +11,7 @@ * ospf_te.h: Add braces, quell warning. * ospf_packet.c: Change level of some warnings to informational. - + 2005-10-29 Paul Jakma <paul.jakma@sun.com> * (general) RFC3137 stub-router support diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index 2cccc143..859e3bc9 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -297,12 +297,10 @@ const char * ospf_timer_dump (struct thread *t, char *buf, size_t size) { struct timeval result; - if (!t) return "inactive"; - timersub (&t->u.sands, &recent_time, &result); - + result = tv_sub (t->u.sands, recent_time); return ospf_timeval_dump (&result, buf, size); } diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c index f6260fbd..564ae847 100644 --- a/ospfd/ospf_spf.c +++ b/ospfd/ospf_spf.c @@ -1171,7 +1171,7 @@ ospf_spf_calculate_schedule (struct ospf *ospf) } /* XXX Monotic timers: we only care about relative time here. */ - timersub (&recent_time, &ospf->ts_spf, &result); + result = tv_sub (recent_time, ospf->ts_spf); elapsed = (result.tv_sec * 1000) + (result.tv_usec / 1000); ht = ospf->spf_holdtime * ospf->spf_hold_multiplier; diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index c3cc4cb4..e28a89c5 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -2653,7 +2653,7 @@ DEFUN (show_ip_ospf, vty_out (vty, " SPF algorithm "); if (ospf->ts_spf.tv_sec || ospf->ts_spf.tv_usec) { - timersub (&recent_time, &ospf->ts_spf, &result); + result = tv_sub (recent_time, ospf->ts_spf); vty_out (vty, "last executed %s ago%s", ospf_timeval_dump (&result, timebuf, sizeof (timebuf)), VTY_NEWLINE); |