]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Resolve Coverity DEADCODE
authorJohn Ferlan <jferlan@redhat.com>
Thu, 4 Sep 2014 19:42:08 +0000 (15:42 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 11 Sep 2014 12:10:13 +0000 (08:10 -0400)
commit60b029c7a0e934278e50d428a22da0119d62c7f6
treeea4e034e803e0b1187ccee7b32ab922df61ece47
parenta893b20eed778cb5928f6412baed249a9909f11d
virsh: Resolve Coverity DEADCODE

Coverity points out that if 'dom' isn't returned from virDomainQemuAttach,
then the code already jumps to cleanup, so there was no need for the
subsequent if (dom != NULL) check.

I moved the error message about failure into the goto cleanup on failure
and then removed the if (dom != NULL)

Signed-off-by: John Ferlan <jferlan@redhat.com>
tools/virsh-domain.c