Message ID | 20181030220318.13998-1-blp@ovn.org |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev,v2,1/3] ovn-northd: Use structure assignment instead of memcpy(). | expand |
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c index 439651f80308..bc07a40bd0f8 100644 --- a/ovn/northd/ovn-northd.c +++ b/ovn/northd/ovn-northd.c @@ -339,7 +339,7 @@ add_chassis_queue(struct hmap *set, struct uuid *chassis_uuid, { struct ovn_chassis_qdisc_queues *node = xmalloc(sizeof *node); node->queue_id = queue_id; - memcpy(&node->chassis_uuid, chassis_uuid, sizeof node->chassis_uuid); + node->chassis_uuid = *chassis_uuid; hmap_insert(set, &node->key_node, uuid_hash(chassis_uuid)); }
Makes the code easier to read. Signed-off-by: Ben Pfaff <blp@ovn.org> --- ovn/northd/ovn-northd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)