Re: [PATCH v2] Avoid integer wrap on remotePortMax in QEMU driver

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

 



On 01/17/13 14:00, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> The QEMU driver default max port is 65535, but it then increments
> this by 1 to 65536. This maps to 0 in an unsigned short :-( This
> was apparently done so that for() loops could use "< max" instead
> of "<= max". Remove this insanity and just make the loop do the
> right thing.
> ---
>  src/qemu/qemu_conf.c         | 4 ----
>  src/util/virportallocator.c  | 6 +++---
>  tests/virportallocatortest.c | 2 +-
>  3 files changed, 4 insertions(+), 8 deletions(-)
> 

ACK

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