]> git.puffer.fish Git - mirror/frr.git/commitdiff
2005-11-04 Paul Jakma <paul.jakma@sun.com>
authorpaul <paul>
Fri, 4 Nov 2005 12:31:39 +0000 (12:31 +0000)
committerpaul <paul>
Fri, 4 Nov 2005 12:31:39 +0000 (12:31 +0000)
* ospf_{dump,spf,vty}.c: Oops, use the internal tv_sub
  function rather than unportable timersub.

ospfd/ChangeLog
ospfd/ospf_dump.c
ospfd/ospf_spf.c
ospfd/ospf_vty.c

index a8ce2f54dcff5d66c949992450cffcbf080fda98..7b77cb4e35be982d685864eb75a43e4e80427e8a 100644 (file)
@@ -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
index 2cccc143e7532621d8c5d8aaa415fb929628abb0..859e3bc972432649e840fd7ca6c93e84163025ba 100644 (file)
@@ -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);
 }
 
index f6260fbda3d9130b78ba286e3f0671fd3ae0954c..564ae847c6b2839a300545df963b7872eed294d8 100644 (file)
@@ -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;
index c3cc4cb4db835ecbba649ad198a769d548837438..e28a89c514fa57318f9fc664e34ce81f8cacc0bd 100644 (file)
@@ -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);