[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] qemu_hotplug: Resolve DEADCODE coverity error



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]