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

Re: [libvirt] [PATCH] python: improve conversion validation



On 03/31/2012 01:36 AM, Osier Yang wrote:
> On 03/31/2012 02:49 AM, Eric Blake wrote:
>> Laszlo Ersek pointed out that in trying to convert a long to an
>> unsigned int, we used:
>>
>> long long_val = ...;
>> if ((unsigned int)long_val == long_val)
>>

>> Fix this by using direct comparisons, rather than casting.
>>
>> * python/typewrappers.c (libvirt_intUnwrap, libvirt_uintUnwrap)
>> (libvirt_ulongUnwrap, libvirt_ulonglongUnwrap): Fix conversion
>> checks.
>> ---

> 
> Looks good, ACK

Thanks; pushed.

-- 
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]