Signed-off-by: Ben Pfaff <b...@nicira.com>
---
 lib/lldp/lldpd-structs.c | 4 ++--
 lib/lldp/lldpd.c         | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/lldp/lldpd-structs.c b/lib/lldp/lldpd-structs.c
index 7a434ff..bd77c28 100644
--- a/lib/lldp/lldpd-structs.c
+++ b/lib/lldp/lldpd-structs.c
@@ -18,9 +18,9 @@
 #include <config.h>
 #include "lldpd-structs.h"
 #include <stdlib.h>
-#include <time.h>
 #include <unistd.h>
 #include "lldpd.h"
+#include "timeval.h"
 
 VLOG_DEFINE_THIS_MODULE(lldpd_structs);
 
@@ -69,7 +69,7 @@ lldpd_remote_cleanup(struct lldpd_hardware *hw,
 {
     struct lldpd_port *port, *port_next;
     int del;
-    time_t now = time(NULL);
+    time_t now = time_now();
 
     VLOG_DBG("cleanup remote port on %s", hw->h_ifname);
     LIST_FOR_EACH_SAFE (port, port_next, p_entries, &hw->h_rports.p_entries) {
diff --git a/lib/lldp/lldpd.c b/lib/lldp/lldpd.c
index a5a07b9..88cebe0 100644
--- a/lib/lldp/lldpd.c
+++ b/lib/lldp/lldpd.c
@@ -29,7 +29,6 @@
 #include <sys/time.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-#include <time.h>
 #include <unistd.h>
 #ifndef _WIN32
 #include <grp.h>
@@ -42,6 +41,7 @@
 #include "compiler.h"
 #include "list.h"
 #include "packets.h"
+#include "timeval.h"
 
 VLOG_DEFINE_THIS_MODULE(lldpd);
 
@@ -267,7 +267,7 @@ lldpd_decode(struct lldpd *cfg, char *frame, int s,
             (memcmp(oport->p_lastframe->frame, frame, s) == 0)) {
             /* Already received the same frame */
             VLOG_DBG("duplicate frame, no need to decode");
-            oport->p_lastupdate = time(NULL);
+            oport->p_lastupdate = time_now();
             return;
         }
     }
@@ -384,7 +384,7 @@ lldpd_decode(struct lldpd *cfg, char *frame, int s,
     }
 
     /* Add port */
-    port->p_lastchange = port->p_lastupdate = time(NULL);
+    port->p_lastchange = port->p_lastupdate = time_now();
     port->p_lastframe = xmalloc(s + sizeof(struct lldpd_frame));
     port->p_lastframe->size = s;
     memcpy(port->p_lastframe->frame, frame, s);
-- 
2.1.3

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to