Signed-off-by: Bhanuprakash Bodireddy <[email protected]>
---
 lib/pcap-file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/pcap-file.c b/lib/pcap-file.c
index 981d56d..60280fb 100644
--- a/lib/pcap-file.c
+++ b/lib/pcap-file.c
@@ -174,7 +174,7 @@ ovs_pcap_read(FILE *file, struct dp_packet **bufp, long 
long int *when)
     if (when) {
         uint32_t ts_sec = swap ? uint32_byteswap(prh.ts_sec) : prh.ts_sec;
         uint32_t ts_usec = swap ? uint32_byteswap(prh.ts_usec) : prh.ts_usec;
-        *when = ts_sec * 1000LL + ts_usec / 1000;
+        *when = ts_sec * MSEC_PER_SEC + ts_usec / USEC_PER_MSEC;
     }
 
     /* Read packet. Packet type is Ethernet */
-- 
2.4.11

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to