[ovs-dev] [PATCH v2 1/3] ovn-northd: Use structure assignment instead of memcpy().

Ben Pfaff blp at ovn.org
Tue Oct 30 22:03:16 UTC 2018


Makes the code easier to read.

Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 ovn/northd/ovn-northd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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));
 }
 
-- 
2.16.1



More information about the dev mailing list