On 07/25/2013 03:27 AM, Daniel P. Berrange wrote: >> This fix looks correct, but it's annoying that we have to cast the 'a' >> length argument in every caller. I'm wondering if a better fix would be >> to virDBusMessageEncode to take an 'int' instead of a 'size_t' arg for >> "a" length; even though that is technically an arbitrary limitation on >> 64-bit platforms, I seriously doubt anyone plans to use dBus to send >> more than 2G of objects. > > The code requires an int already > > narray = va_arg(args, int); Yay - the underlying implementation is correct. > > so both the (long long) and (size_t) casts are bogus. We can just > remove the cast completely. Serves me right for not checking whether the va_arg was using the right type in the first place. Guido's second version that drops the cast completely is correct. -- 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