[libvirt] [PATCH] cpu: Improve error reporting on incompatible CPUs

Eric Blake eblake at redhat.com
Thu Apr 19 21:48:47 UTC 2012


On 04/19/2012 07:45 AM, Jiri Denemark wrote:

>> +#define virX86CpuIncompatible(MSG, CPU_DEF)                             \
>> +        do {                                                            \

>> +        } while (0);
> 
> I can't think of any case where ";;" would be a problem but I'd remove the ';'
> from the end of this macro anyway

I can:

if (cond)
    virX86CpuIncompatible(msg, def);
else
    do_something_else();

that bogus ';' in the #define means you now have a syntax error.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120419/465dd665/attachment-0001.sig>


More information about the libvir-list mailing list