[libvirt] [PATCH] qemu: Use macro for max and min vnc port instead of number

Eric Blake eblake at redhat.com
Wed Dec 1 17:32:23 UTC 2010


On 12/01/2010 05:35 AM, Osier Yang wrote:
> * src/qemu/qemu_driver.c (though MACROS QEMU_VNC_PORT_MAX, and
> QEMU_VNC_PORT_MIN are defined at the beginning, numbers (65535, 5900)
> are still used, replace them)
> 
> ---
>  src/qemu/qemu_driver.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index fcb90a3..f733482 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -2964,7 +2964,7 @@ static int qemudNextFreePort(struct qemud_driver *driver,
>                               int startPort) {
>      int i;
> 
> -    for (i = startPort ; i < 65535 ; i++) {
> +    for (i = startPort ; i < QEMU_VNC_PORT_MAX; i++) {

ACK; pushed.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list