[libvirt] [PATCH v7 2/4] net-dhcp-leases: Implement the remote protocol

Daniel P. Berrange berrange at redhat.com
Tue Jun 24 10:59:48 UTC 2014


On Tue, Jun 24, 2014 at 02:31:50AM +0530, Nehal J Wani wrote:
> diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
> index bef9fd7..d6eb477 100644
> --- a/src/remote/remote_driver.c
> +++ b/src/remote/remote_driver.c
> @@ -7549,6 +7549,190 @@ remoteNodeGetFreePages(virConnectPtr conn,
>  }
>  
>  
> +/* Copy contents of remote_network_dhcp_lease to virNetworkDHCPLeasePtr */
> +static int
> +remoteSerializeDHCPLease(virNetworkDHCPLeasePtr lease_dst, remote_network_dhcp_lease *lease_src)
> +{
> +    lease_dst->expirytime = lease_src->expirytime;
> +    lease_dst->type = lease_src->type;
> +    lease_dst->prefix = lease_src->prefix;
> +
> +    if (VIR_STRDUP(lease_dst->interface, lease_src->interface) < 0)
> +            goto error;
> +
> +    if (VIR_STRDUP(lease_dst->ipaddr, lease_src->ipaddr) < 0)
> +            goto error;

Wrong indent

> +
> +    if (lease_src->mac) {
> +        if (VIR_STRDUP(lease_dst->mac, *lease_src->mac) < 0)
> +            goto error;
> +    } else
> +        lease_src->mac = NULL;

If the 'if' has {}, then the 'else' must have {} too. Repeated
several times later too.


ACK will fix those when pushihng

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list