On 11/22/2013 03:02 PM, Jim Fehlig wrote: > Chunyan Liu wrote: >> Add hostdev passthrough common library so that it could be shared by all drivers >> and maintain a global hostdev state. >> > > Hi Chunyan, > > Looks like you addressed all of Daniel's comments from v5. One bug fix > and a few additional comments below... > >> + bool strict_acs_check = (flags & VIR_STRICT_ACS_CHECK)?true:false; >> > > Needs some whitespace, e.g. > > bool coldBoot = (flags & VIR_COLD_BOOT) ? true : false; Or even simpler: bool coldBoot = !!(flags & VIR_COLD_BOOT); [Technically, we can go one further, if we could rely on 'bool' actually obeying C99: bool coldBoot = flags & VIR_COLD_BOOT; but that still gives me the willies, because we are using gnulib's <stdbool.h> as needed for portability. Gnulib documents that when it is working around the more blatant bugs in fringe/old compilers, it can no longer guarantee the C99 semantics of assignment to bool implicitly flattening non-zero values to 'true'. In fact, I suspect RHEL 5 gcc may be one such compiler that doesn't have full C99 bool rule compliance] -- 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