qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/4] qom: split object_property_set_link()


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 1/4] qom: split object_property_set_link()
Date: Wed, 05 Mar 2014 10:26:33 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Am 04.03.2014 22:45, schrieb Stefan Hajnoczi:
> The path resolution logic in object_property_set_link() should be a
> separate function.  This makes the code easier to read and maintain.
> 
> More importantly, the error behavior of object_property_set_link() is
> dangerous.  It sets the link property object to NULL if an error occurs.
> A setter function should either succeed or fail, it shouldn't leave the
> value NULL on failure.
> 
> This patch splits the code and fixes the error case so the old link
> property object is left in place on failure.
> 
> Signed-off-by: Stefan Hajnoczi <address@hidden>

Since this code movement is a bit invasive due to the reindent (looks OK
though), can we do this in two steps please? First split, then fix?

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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