Re: [Qemu-devel] [PATCH v3 03/12] qga: move string split in separate function

2015-08-26 Thread Denis V. Lunev
On 08/26/2015 09:30 PM, Marc-André Lureau wrote: Hi On Wed, Aug 26, 2015 at 8:23 PM, Denis V. Lunev wrote: I think that this side effect is visible if the code remains in place and becomes invisible since you move it to the function. This could create problem if somebody will reuse this call.

Re: [Qemu-devel] [PATCH v3 03/12] qga: move string split in separate function

2015-08-26 Thread Marc-André Lureau
Hi On Wed, Aug 26, 2015 at 8:30 PM, Marc-André Lureau wrote: > the list must then be g_list_free_full() Actually, the ga_command_blacklist_init() doesn't dup the string, so it will have to do it too..tbh, I don't mind either way. -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v3 03/12] qga: move string split in separate function

2015-08-26 Thread Marc-André Lureau
Hi On Wed, Aug 26, 2015 at 8:23 PM, Denis V. Lunev wrote: > I think that this side effect is visible if the code remains in place > and becomes invisible since you move it to the function. > This could create problem if somebody will reuse this call. what about replacing it with: static GList *

Re: [Qemu-devel] [PATCH v3 03/12] qga: move string split in separate function

2015-08-26 Thread Denis V. Lunev
On 08/26/2015 09:07 PM, Marc-André Lureau wrote: Hi On Wed, Aug 26, 2015 at 7:55 PM, Denis V. Lunev wrote: it would be much better to declare this helper as "split_list(const gchar *str, ... and make temporary copy of parameter inside. Without this the function as NASTY side-effect and trashes

Re: [Qemu-devel] [PATCH v3 03/12] qga: move string split in separate function

2015-08-26 Thread Marc-André Lureau
Hi On Wed, Aug 26, 2015 at 7:55 PM, Denis V. Lunev wrote: > it would be much better to declare this helper as "split_list(const gchar > *str, ... > and make temporary copy of parameter inside. Without this the function > as NASTY side-effect and trashes the string passed in. > Also it is rather r

Re: [Qemu-devel] [PATCH v3 03/12] qga: move string split in separate function

2015-08-26 Thread Denis V. Lunev
On 08/26/2015 01:05 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The function is going to be reused in a later patch. Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth --- qga/main.c | 33 ++--- 1 file changed, 22 insertions(+), 11 de