[Qemu-devel] [PATCH 5/5] linux-user/syscall: Replace g_malloc0 + memcpy with g_memdup

2015-10-08 Thread Thomas Huth
No need to use g_malloc0 to zero the memory if we memcpy to the whole buffer afterwards anyway. Actually, there is even a function which combines both steps, g_memdup, so let's use this function here instead. Cc: Riku Voipio Signed-off-by: Thomas Huth --- linux-user/syscall.c | 3 +-- 1 file ch

Re: [Qemu-devel] [PATCH 5/5] linux-user/syscall: Replace g_malloc0 + memcpy with g_memdup

2015-10-08 Thread Eric Blake
On 10/08/2015 01:35 PM, Thomas Huth wrote: > No need to use g_malloc0 to zero the memory if we memcpy to > the whole buffer afterwards anyway. Actually, there is even > a function which combines both steps, g_memdup, so let's use > this function here instead. > > Cc: Riku Voipio > Signed-off-by: