[Qemu-devel] [patch] replace all strdup() with g_strdup()

2011-12-16 Thread Jun Koi
This patch replaces all the strdup() with g_strdup() Signed-off-by: Jun Koi junkoi2...@gmail.com $ diffstat strdup.diff cmd.c |4 ++-- envlist.c |6 +++--- exec.c |2 +- hw/isa-bus.c|2 +- hw/pc.c |2 +- hw/pci.c

Re: [Qemu-devel] [patch] replace all strdup() with g_strdup()

2011-12-16 Thread 陳韋任
Hi, You can check http://wiki.qemu.org/Contribute/SubmitAPatch to see how to send patch to qemu-devel. :) Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage:

Re: [Qemu-devel] [patch] replace all strdup() with g_strdup()

2011-12-16 Thread Peter Maydell
On 16 December 2011 08:07, Jun Koi junkoi2...@gmail.com wrote: This patch replaces all the strdup() with g_strdup() I don't think you can do this as a pure search-and-replace. For example this change: --- a/envlist.c +++ b/envlist.c @@ -109,7 +109,7 @@ envlist_parse(envlist_t *envlist, const

Re: [Qemu-devel] [patch] replace all strdup() with g_strdup()

2011-12-16 Thread Paolo Bonzini
On 12/16/2011 09:07 AM, Jun Koi wrote: This patch replaces all the strdup() with g_strdup() Signed-off-by: Jun Koijunkoi2...@gmail.com $ diffstat strdup.diff cmd.c |4 ++-- envlist.c |6 +++--- exec.c |2 +- hw/isa-bus.c|2 +-

Re: [Qemu-devel] [patch] replace all strdup() with g_strdup()

2011-12-16 Thread Daniel P. Berrange
On Fri, Dec 16, 2011 at 10:26:33AM +0100, Paolo Bonzini wrote: On 12/16/2011 09:07 AM, Jun Koi wrote: This patch replaces all the strdup() with g_strdup() Signed-off-by: Jun Koijunkoi2...@gmail.com $ diffstat strdup.diff cmd.c |4 ++-- envlist.c |6

Re: [Qemu-devel] [patch] replace all strdup() with g_strdup()

2011-12-16 Thread Paolo Bonzini
On 12/16/2011 10:41 AM, Daniel P. Berrange wrote: Yes no. In general you are correct that g_malloc/g_strdup needs to be matched with g_free, but in the context of the QEMU binary at least we don't strictly need that. The general issue is that GLib's memory allocators default to the system