On Fri, Sep 18, 2015 at 18:05:52 +0300, Nikolay Shirokovskiy wrote: > Check dconnuri is not null or we will catch nullpointer later. > I hope this makes Coverity happy. > > Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx> > --- > src/libvirt-domain.c | 8 ++++++-- > 1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c > index f012f4b..380f374 100644 > --- a/src/libvirt-domain.c > +++ b/src/libvirt-domain.c > @@ -4384,7 +4384,9 @@ virDomainMigrateToURI2(virDomainPtr domain, > if (virDomainMigrateUnmanagedCheckCompat(domain, flags) < 0) > goto cleanup; > > - if (!(flags & VIR_MIGRATE_PEER2PEER)) > + if (flags & VIR_MIGRATE_PEER2PEER) > + virCheckNonNullArgGoto(dconnuri, cleanup); > + else > dconnuri = NULL; > > ret = virDomainMigrateUnmanaged(domain, NULL, flags, > @@ -4454,7 +4456,9 @@ virDomainMigrateToURI3(virDomainPtr domain, > if (virDomainMigrateUnmanagedCheckCompat(domain, flags) < 0) > goto cleanup; > > - if (!(flags & VIR_MIGRATE_PEER2PEER)) > + if (flags & VIR_MIGRATE_PEER2PEER) > + virCheckNonNullArgGoto(dconnuri, cleanup); > + else > dconnuri = NULL; > > ret = virDomainMigrateUnmanagedParams(domain, dconnuri, ACK, although you may need to update the labels after dropping the previous patch. Jirka -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list