From: Ján Tomko Date: Fri, 26 Jul 2013 11:10:12 +0000 (+0200) Subject: Resolve Coverity complaint in storagevolxml2argvtest X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=99d3a60b1f612af79c713764002eaa1d000754b0;p=libvirt.git Resolve Coverity complaint in storagevolxml2argvtest Ignore NULL pool in testSetVolumeType to silence Coverity, even though we only call it with NULL pool when vol is also NULL. (13) Event var_deref_model: Passing null pointer "inputpool" to function "testSetVolumeType(virStorageVolDefPtr, virStoragePoolDefPtr)", which dereferences it. [details] Also see events: [assign_zero] 95 testSetVolumeType(inputvol, inputpool); --- diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c index 7774617e60..b1cf09f1d7 100644 --- a/tests/storagevolxml2argvtest.c +++ b/tests/storagevolxml2argvtest.c @@ -16,7 +16,7 @@ static void testSetVolumeType(virStorageVolDefPtr vol, virStoragePoolDefPtr pool) { - if (!vol) + if (!vol || !pool) return; switch (pool->type) {