On 04/01/2014 02:56 AM, Ján Tomko wrote: > On 03/31/2014 08:50 PM, Cole Robinson wrote: >> VolOpen notifies the user of a potentially non-fatal failure by >> returning -2 and logging a VIR_WARN or VIR_INFO. Unfortunately most >> callers treat -2 as fatal but don't actually report any message with >> the error APIs. >> >> + bool raise_error = (flags & VIR_STORAGE_VOL_OPEN_ERROR); > > We've been using !!(flags & FLAG) for this kind of assignment, but I can't > remember what that fixes. It fixes the fact that gnulib's stdbool module works around C89 compilers that lack a native _Bool type, and therefore might assign a value other than 1 into what is supposed to be 0 or 1. But since we use other C99 features, it probably doesn't hurt us to assume that assignments to bool are handled correctly by the compiler. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list