Re: [Qemu-devel] [PATCH v6 05/10] util/path: Use the GLib memory allocation routines

2014-08-17 Thread zhanghailiang
On 2014/8/14 18:15, Michael S. Tsirkin wrote: On Thu, Aug 14, 2014 at 03:29:16PM +0800, zhanghailiang wrote: In this file, we don't check the return value of malloc/strdup/realloc which may fail. Instead of using these routines, we use the GLib memory APIs g_malloc/g_strdup/g_realloc. They wil

Re: [Qemu-devel] [PATCH v6 05/10] util/path: Use the GLib memory allocation routines

2014-08-14 Thread Michael S. Tsirkin
On Thu, Aug 14, 2014 at 03:29:16PM +0800, zhanghailiang wrote: > In this file, we don't check the return value of malloc/strdup/realloc which > may fail. > Instead of using these routines, we use the GLib memory APIs > g_malloc/g_strdup/g_realloc. > They will exit on allocation failure, so there

[Qemu-devel] [PATCH v6 05/10] util/path: Use the GLib memory allocation routines

2014-08-14 Thread zhanghailiang
In this file, we don't check the return value of malloc/strdup/realloc which may fail. Instead of using these routines, we use the GLib memory APIs g_malloc/g_strdup/g_realloc. They will exit on allocation failure, so there is no need to test for failure, which would be fine for setup. Signed-of