qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 04/13] qga: make split_list() return allocate


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH v4 04/13] qga: make split_list() return allocated strings
Date: Thu, 27 Aug 2015 16:30:32 +0200

Hi

On Thu, Aug 27, 2015 at 11:17 AM, Denis V. Lunev <address@hidden> wrote:
> why not to
> __str = g_strsplit(str, delim, -1);
>>>
>>> +    strv = g_strsplit(str, delim, -1);
>>> +    for (i = 0; strv[i]; i++) {
>>> +        list = g_list_prepend(list, strv[i]);
>>>       }
>>> +    g_free(strv);
>
> g_free(__str);
>
> This will remove all burden from callers.
> You will be able to use const char * as argument too.


Sorry, I don't understand, could you propose a different patch?

-- 
Marc-André Lureau



reply via email to

[Prev in Thread] Current Thread [Next in Thread]