[libvirt] [PATCHv2] leaseshelper: split out virLeaseNew

Ján Tomko jtomko at redhat.com
Tue Feb 9 12:28:35 UTC 2016


On Tue, Feb 09, 2016 at 06:11:07AM -0500, John Ferlan wrote:
> 
> 
> On 02/05/2016 11:49 AM, Ján Tomko wrote:
> > +static int
> > +virLeaseNew(virJSONValuePtr *lease_ret,
> > +            const char *mac,
> > +            const char *clientid,
> > +            const char *ip,
> > +            const char *hostname,
> > +            const char *iaid,
> > +            const char *server_duid)
> 
> Coverity complains - order of arguments appears swapped...
> 
> ...iaid, server_duid)
> 
> [1]

> > @@ -405,6 +461,9 @@ main(int argc, char **argv)
> >      switch ((enum virLeaseActionFlags) action) {
> >      case VIR_LEASE_ACTION_ADD:
> >      case VIR_LEASE_ACTION_OLD:
> > +        /* Create new lease */
> > +        if (virLeaseNew(&lease_new, mac, clientid, ip, hostname, server_duid, iaid) < 0)
> 
> While here it's ...server_duid, iaid)
> 

Thanks,

fixed by:
commit 99a6f30db0781ee74c7c373ace9553cba299094b
    leaseshelper: swap two parameters of virLeaseNew

Jan
> John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160209/b59bcbcf/attachment-0001.sig>


More information about the libvir-list mailing list