]> git.ipfire.org Git - thirdparty/libvirt.git/commit
cmdVcpuPin: Remove dead code
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 14 Jul 2015 14:23:26 +0000 (16:23 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 15 Jul 2015 09:40:41 +0000 (11:40 +0200)
commit416d0e94181086e572107ab9c295b70d98f0782b
treef988fba8f0fd04f0b0adfa4c3c042eff7fece942
parentcd043390ffddb5693dcd5056682180ceff8b5b55
cmdVcpuPin: Remove dead code

There's this condition:

flags & VIR_DOMAIN_AFFECT_CURRENT && virDomainIsActive(dom)

which can never be true since VIR_DOMAIN_AFFECT_CURRENT has hardcoded
value of zero. Therefore virDomainIsActive() is a dead code. However,
the condition could make sense if it is rewritten as the following:

!(flags & VIR_DOMAIN_AFFECT_CONFIG) && virDomainIsActive(dom)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
tools/virsh-domain.c