Re: [PATCH] python: improve conversion validation

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

 



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@xxxxxxxxxx    +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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]