Re: [libvirt] [PATCH 1/2] Fix improper error return in virInterfaceDefParseProtoIPvX

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

 



On Wed, Oct 28, 2009 at 03:25:43AM -0400, Laine Stump wrote:
> ---
>  src/conf/interface_conf.c |   14 ++++++++------
>  1 files changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c
> index 7cb71ed..fc18eba 100644
> --- a/src/conf/interface_conf.c
> +++ b/src/conf/interface_conf.c
> @@ -309,10 +309,11 @@ virInterfaceDefParseProtoIPv4(virConnectPtr conn, virInterfaceProtocolDefPtr def
>      def->gateway = tmp;
>  
>      dhcp = virXPathNode(conn, "./dhcp", ctxt);
> -    if (dhcp != NULL)
> +    if (dhcp != NULL) {
>          ret = virInterfaceDefParseDhcp(conn, def, dhcp, ctxt);
> -    if (ret != 0)
> -        return(ret);
> +        if (ret != 0)
> +           return(ret);
> +    }
>  
>      nIpNodes = virXPathNodeSet(conn, "./ip", ctxt, &ipNodes);
>      if (ipNodes == NULL)
> @@ -365,10 +366,11 @@ virInterfaceDefParseProtoIPv6(virConnectPtr conn, virInterfaceProtocolDefPtr def
>          def->autoconf = 1;
>  
>      dhcp = virXPathNode(conn, "./dhcp", ctxt);
> -    if (dhcp != NULL)
> +    if (dhcp != NULL) {
>          ret = virInterfaceDefParseDhcp(conn, def, dhcp, ctxt);
> -    if (ret != 0)
> -        return(ret);
> +        if (ret != 0)
> +           return(ret);
> +    }
>  
>      nIpNodes = virXPathNodeSet(conn, "./ip", ctxt, &ipNodes);
>      if (ipNodes == NULL)

ACK

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

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