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

Numan Siddique nusiddiq at redhat.com
Wed Oct 31 17:47:34 UTC 2018


On Wed, Oct 31, 2018 at 3:21 AM Ben Pfaff <blp at ovn.org> wrote:

> Makes the code easier to read.
>
> Signed-off-by: Ben Pfaff <blp at ovn.org>
>

Acked-by: Numan Siddique <nusiddiq at redhat.com>


> ---
>  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
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list