From c037c779dff1eef0b13fe3134c4ebf31150df003 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Fri, 6 May 2016 10:34:51 +0100 Subject: [PATCH] let compiler manage the copy in a more typesafe way Do not use memcpy but just copy the data Signed-off-by: Frediano Ziglio Acked-by: Pavel Grunt --- server/red-channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/red-channel.c b/server/red-channel.c index 43b053ac..1fb8378d 100644 --- a/server/red-channel.c +++ b/server/red-channel.c @@ -1034,7 +1034,7 @@ RedChannel *red_channel_create(int size, channel->refs = 1; channel->handle_acks = handle_acks; channel->migration_flags = migration_flags; - memcpy(&channel->channel_cbs, channel_cbs, sizeof(ChannelCbs)); + channel->channel_cbs = *channel_cbs; channel->reds = reds; channel->core = core;