[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
[Qemu-devel] [PATCH v4 05/13] qga: rename 'path' to 'channel_path', marcandre . lureau, 2015/08/26
[Qemu-devel] [PATCH v4 06/13] qga: copy argument strings, marcandre . lureau, 2015/08/26
[Qemu-devel] [PATCH v4 07/13] qga: move option parsing to separate function, marcandre . lureau, 2015/08/26
[Qemu-devel] [PATCH v4 08/13] qga: fill default options in main(), marcandre . lureau, 2015/08/26
[Qemu-devel] [PATCH v4 09/13] qga: move agent run in a separate function, marcandre . lureau, 2015/08/26
[Qemu-devel] [PATCH v4 10/13] qga: free a bit more, marcandre . lureau, 2015/08/26
[Qemu-devel] [PATCH v4 11/13] qga: add an optional qemu-ga.conf system configuration, marcandre . lureau, 2015/08/26