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

diff --git a/lib/lldp/lldpd.c b/lib/lldp/lldpd.c
index c7b40d2..06f8ea0 100644
--- a/lib/lldp/lldpd.c
+++ b/lib/lldp/lldpd.c
@@ -86,8 +86,8 @@ lldpd_alloc_hardware(struct lldpd *cfg, char *name, int index)
     hw->h_cfg = cfg;
     ovs_strlcpy(hw->h_ifname, name, sizeof hw->h_ifname);
     hw->h_ifindex = index;
-    hw->h_lport.p_chassis = (struct lldpd_chassis *)
-    list_front(&cfg->g_chassis.list);
+    hw->h_lport.p_chassis = CONTAINER_OF(list_front(&cfg->g_chassis.list),
+                                         struct lldpd_chassis, list);
     hw->h_lport.p_chassis->c_refcount++;
     list_init(&hw->h_rports);
 
-- 
2.1.3

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

Reply via email to