]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
domain_conf: Resolve Coverity REVERSE_INULL
authorJohn Ferlan <jferlan@redhat.com>
Wed, 27 Aug 2014 12:51:15 +0000 (08:51 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 27 Aug 2014 16:52:27 +0000 (12:52 -0400)
commit0c5ca985971a349e5b4125faa5b48cd57b38cb0a
treee24b499dc5bc94d51b6573d25d1f63fc565f73cb
parent39b9c1214827f0d83cd43d202fa2ef12b67d8f34
domain_conf: Resolve Coverity REVERSE_INULL

Coverity complains that checking for domain->def being non NULL in the
if (live) path of virDomainObjAssignDef() would be unnecessary or a
NULL deref since the call to virDomainObjIsActive() would already
dereference domain->def when checking if the def->id field was != -1.

Checked all callers to virDomainObjAssignDef() and each at some point
dereferences (vm)->def->{field} prior to calling when live is true.
src/conf/domain_conf.c