[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 03/12] qga: move string split in separate fun
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH v3 03/12] qga: move string split in separate function |
Date: |
Wed, 26 Aug 2015 20:07:33 +0200 |
Hi
On Wed, Aug 26, 2015 at 7:55 PM, Denis V. Lunev <address@hidden> 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 reinvents strtok wheel.
Yep, notice I didn't change the code, merely moved it.
> you can also use g_strsplit at your convenience, but may be this is overkill
But it doesn't return a glist. So while I agree with you in general,
that wasn't my goal to change this code, but just to be able to reuse
it.
thanks
--
Marc-André Lureau
[Qemu-devel] [PATCH v3 04/12] qga: rename 'path' to 'channel_path', marcandre . lureau, 2015/08/26
[Qemu-devel] [PATCH v3 05/12] qga: copy argument strings, marcandre . lureau, 2015/08/26