[Qemu-devel] [PATCH v4 1/3] net/rocker: Remove the dead error handling

2017-05-17 Thread Mao Zhongyi
The function of_dpa_world_alloc is a wrapper around world_alloc(), which returns null only when g_malloc0(size_t size) does. But g_malloc0() also is a wrapper around g_malloc0_n(1, size) that ignore the fact that g_malloc0() of 0 bytes, it doesn't returns null. So the error handling is dead. Simila

Re: [Qemu-devel] [PATCH v4 1/3] net/rocker: Remove the dead error handling

2017-05-18 Thread Markus Armbruster
Mao Zhongyi writes: > The function of_dpa_world_alloc is a wrapper around world_alloc(), which > returns null only when g_malloc0(size_t size) does. But g_malloc0() also > is a wrapper around g_malloc0_n(1, size) that ignore the fact that > g_malloc0() of 0 bytes, it doesn't returns null. So the

Re: [Qemu-devel] [PATCH v4 1/3] net/rocker: Remove the dead error handling

2017-05-21 Thread Mao Zhongyi
Hi, Markus Thanks for review and sorry for replying late, I was on the weekend. On 05/19/2017 02:24 PM, Markus Armbruster wrote: Mao Zhongyi writes: The function of_dpa_world_alloc is a wrapper around world_alloc(), which returns null only when g_malloc0(size_t size) does. But g_malloc0() als

Re: [Qemu-devel] [PATCH v4 1/3] net/rocker: Remove the dead error handling

2017-05-21 Thread Markus Armbruster
Mao Zhongyi writes: > Hi, Markus > Thanks for review and sorry for replying late, I was on the weekend. No need to apologize for the weekend. I hope you enjoyed it :) > On 05/19/2017 02:24 PM, Markus Armbruster wrote: >> Mao Zhongyi writes: >> >>> The function of_dpa_world_alloc is a wrapper

Re: [Qemu-devel] [PATCH v4 1/3] net/rocker: Remove the dead error handling

2017-05-22 Thread Mao Zhongyi
On 05/22/2017 02:35 PM, Markus Armbruster wrote: Mao Zhongyi writes: Hi, Markus Thanks for review and sorry for replying late, I was on the weekend. No need to apologize for the weekend. I hope you enjoyed it :) On 05/19/2017 02:24 PM, Markus Armbruster wrote: Mao Zhongyi writes: Th