[libvirt] Some problem with the save function

Charles Duffy charles at dyfis.net
Fri Sep 18 16:32:35 UTC 2009


Chris Lalancette wrote:
> No, you are right.  This was part of the refactoring, and I just didn't re-read
> the code.  I would prefer to move prog to the top of the block myself, and add
> args there; it just seems tidier.
>   

I agree that it's tidier -- but looking at things in context, I'm not 
very comfortable putting the declarations at the very top of the 
function. Part of the reason is that everything else there is 
initialized, even if only to NULL; I hate to break such a convention, 
but at the same time, I find it dangerous to suppress any warnings the 
compiler might otherwise be able to generate should a codepath allow a 
variable be used uninitialized.

Does the below (creating a new code block and declaring both variables 
there) work for everyone?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-prevent-attempt-to-call-cat-c-during-virDomainSave-t-r2.patch
Type: text/x-patch
Size: 1776 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090918/22f33e3e/attachment-0001.bin>


More information about the libvir-list mailing list