Re: [PATCH 6/6] Fix coverity complain in commandtest.c

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

 




On 01/13/2014 11:12 AM, Pavel Hrdina wrote:
> For a "newfd1" the coverity tool thinks that the fd is closed in
> a "virCommandPassFD", but with "flags == 0" it cannot be never
> closed.

I think you meant "cannot be close" the never is a double negative.

> 
> The code itself is ok, but coverity tool thinks that there is
> "double_close" of the "newfd1" and to prevent showing this error
> we simply add a comment before the proper close.
> 
> This has been found by coverity.
> 
> Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
> ---
>  tests/commandtest.c | 1 +
>  1 file changed, 1 insertion(+)
> 

When this was first changed/submitted:

http://www.redhat.com/archives/libvir-list/2013-July/msg00831.html

and thus seen by my nightly Coverity run, I remember asking Dan about
this, but I think in the end the thought was it was a Coverity bug. I
had always meant to go back to it to see if I could put together a
reproducer to submit to Coverity as a bug report, but never quite got
around to it.

I suppose though, this is a viable "way around" the message, although it
may be a good idea to still revisit as a Coverity issue assuming a
reproducer program could be put together.

ACK with the grammar fix from above

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]