[libvirt] [libvirt-sandbox][PATCH 1/4] builder: Drop dead code in gvir_sandbox_builder_clean_post_stop
At the 'cleanup' label we try to unref @child. However, whenever the label is entered there's no chance for the variable to be anything else than NULL rendering those two lines as dead code. Drop it. And it's the same story with @info. Signed-off-by: Michal Privoznik--- libvirt-sandbox/libvirt-sandbox-builder.c | 4 1 file changed, 4 deletions(-) diff --git a/libvirt-sandbox/libvirt-sandbox-builder.c b/libvirt-sandbox/libvirt-sandbox-builder.c index ea7d064..b4b4d77 100644 --- a/libvirt-sandbox/libvirt-sandbox-builder.c +++ b/libvirt-sandbox/libvirt-sandbox-builder.c @@ -752,10 +752,6 @@ gboolean gvir_sandbox_builder_clean_post_stop(GVirSandboxBuilder *builder, ret = FALSE; cleanup: -if (child) -g_object_unref(child); -if (info) -g_object_unref(info); g_object_unref(enumerator); g_object_unref(libsFile); g_free(libsdir); -- 2.4.9 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [libvirt-sandbox][PATCH 1/4] builder: Drop dead code in gvir_sandbox_builder_clean_post_stop
On Wed, Sep 23, 2015 at 11:15:21AM +0200, Michal Privoznik wrote: > At the 'cleanup' label we try to unref @child. However, whenever > the label is entered there's no chance for the variable to be > anything else than NULL rendering those two lines as dead code. > Drop it. And it's the same story with @info. > > Signed-off-by: Michal Privoznik> --- > libvirt-sandbox/libvirt-sandbox-builder.c | 4 > 1 file changed, 4 deletions(-) ACK Regards, Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list