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

Jim Meyering jim at meyering.net
Tue Jan 5 16:26:44 UTC 2010

Chris Lalancette wrote:

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

Thanks for the review.  Pushed.

More information about the libvir-list mailing list