[libvirt] [PATCH] qemu_hotplug: Resolve DEADCODE coverity error
John Ferlan
jferlan at redhat.com
Sun Sep 1 23:33:57 UTC 2013
On 08/31/2013 07:24 AM, John Ferlan wrote:
> Remove unused 'cgroup' variable in qemuDomainAttachDeviceDiskLive() to
> resolve coverity DEADCODE complaint
>
> ---
> Refactoring of qemuDomainAttachDeviceDiskLive() in the following patch:
>
> https://www.redhat.com/archives/libvir-list/2013-August/msg00079.html
>
> seemed to wake up Coverity and it complained about deadcode as a result
> of 'cgroup' only ever been NULL thus the check for it to be non-NULL in
> order to call qemuTeardownDiskCgroup() would not be able to occur. The
> code actually hadn't changed, but for some reason coverity now found it.
>
> Followed example in qemuDomainChangeDiskMediaLive() and just removed the
> 'cgroup' variable.
>
> src/qemu/qemu_hotplug.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
Pushed.
John
More information about the libvir-list
mailing list