Re: [libvirt] [PATCH] qemu_driver.c: remove useless, warning-provoking test

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

 



On 01/05/2010 10:37 AM, Jim Meyering wrote:
> Tools like coverity and maybe clang notice that we dereference
> uri_out, and then (later) test whether uri_out is NULL.
> Obviously one or the other must go.
> 
> Presuming that we will always pass a non-NULL uri_out arg to
> this function, I chose to mark that parameter as ATTRIBUTE_NONNULL.
> I removed the unnecessary test, too.
> 
> If anyone is concerned that a non-NULL (non-literal)
> value will be passed, I can also add an assertion.

The change you make below is correct.  uri_out can never be NULL
in the code we have today, so the additional check is useless.

ACK

-- 
Chris Lalancette

--
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]