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

Re: [libvirt] [PATCH 2/5] commandtest: Resolve some coverity resource leaks



On 02/15/2013 02:01 AM, Peter Krempa wrote:

>> So, one could logically believe the check could change to:
>>
>>      sa_assert(fd == -1 || (fd >= 3 && fd <= 8));

Yes, I like that.

>>>> ACK with the assertion removed or a sufficient explanation provided.
> 
> I think this is a sufficient explanation, so ACK (as long as sa_assert
> has no side effects normally).

sa_assert is a no-op when static analysis is not being performed.
That's why we prefer it over raw assert(), because sa_assert() does not
change based on NDEBUG, only based on toolchain.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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