Nothing used this, except to initialize and free it. It wasn't meaningful in any case, it was just the name of the first logical port encountered from a particular logical datapath when traversing the database's Port_Binding table, which isn't in a meaningful order.
Also, use assignment to copy uuids; no need for memcpy here. Signed-off-by: Ben Pfaff <[email protected]> --- ovn/controller/binding.c | 3 +-- ovn/controller/ovn-controller.c | 1 - ovn/controller/ovn-controller.h | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/ovn/controller/binding.c b/ovn/controller/binding.c index d7b175e..db28cc8 100644 --- a/ovn/controller/binding.c +++ b/ovn/controller/binding.c @@ -114,8 +114,7 @@ add_local_datapath(struct hmap *local_datapaths, } struct local_datapath *ld = xzalloc(sizeof *ld); - ld->logical_port = xstrdup(binding_rec->logical_port); - memcpy(&ld->uuid, &binding_rec->header_.uuid, sizeof ld->uuid); + ld->uuid = binding_rec->header_.uuid; hmap_insert(local_datapaths, &ld->hmap_node, binding_rec->datapath->tunnel_key); } diff --git a/ovn/controller/ovn-controller.c b/ovn/controller/ovn-controller.c index 52eb491..45537de 100644 --- a/ovn/controller/ovn-controller.c +++ b/ovn/controller/ovn-controller.c @@ -566,7 +566,6 @@ main(int argc, char *argv[]) struct local_datapath *cur_node, *next_node; HMAP_FOR_EACH_SAFE (cur_node, next_node, hmap_node, &local_datapaths) { hmap_remove(&local_datapaths, &cur_node->hmap_node); - free(cur_node->logical_port); free(cur_node); } hmap_destroy(&local_datapaths); diff --git a/ovn/controller/ovn-controller.h b/ovn/controller/ovn-controller.h index 78c8b08..46c381b 100644 --- a/ovn/controller/ovn-controller.h +++ b/ovn/controller/ovn-controller.h @@ -55,7 +55,6 @@ struct local_datapath { struct hmap_node hmap_node; struct hmap_node uuid_hmap_node; struct uuid uuid; - char *logical_port; const struct sbrec_port_binding *localnet_port; }; -- 2.10.2 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
