qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

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