Fix the warning from Coverity about potential truncation of the
time_t value when copying to a local variable by changing the
local variable's type to time_t.

Fixes: ccc24fc88d59 ("ofproto-dpif: APIs and CLI option to add/delete static 
fdb entry.")
Acked-by: Mike Pattrick <m...@redhat.com>
Acked-by: Paolo Valerio <pvale...@redhat.com>
Signed-off-by: Eelco Chaudron <echau...@redhat.com>
---
 ofproto/ofproto-dpif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 32d037be6..fcd7cd753 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -6097,7 +6097,7 @@ ofproto_unixctl_fdb_add(struct unixctl_conn *conn, int 
argc OVS_UNUSED,
     const char *port_name = argv[2];
     uint16_t vlan = atoi(argv[3]);
     struct eth_addr mac;
-    int age;
+    time_t age;
 
     ofproto = ofproto_dpif_lookup_by_name(br_name);
     if (!ofproto) {
-- 
2.44.0

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to