Re: [PATCH v3 7/8] test: snapshot: Add REDEFINE support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/25/2013 03:15 PM, Cole Robinson wrote:
> ---
>  src/test/test_driver.c | 67 ++++++++++++++++++++++++++++++++------------------
>  1 file changed, 43 insertions(+), 24 deletions(-)
> 
Coverity complains here (there's another 

6680 	
6681 	    if (redefine) {

(1) Event missing_parentheses: 	"!virDomainSnapshotRedefinePrep(domain, vm, &def, &snap, &update_current, flags) < 0" is always false regardless of the values of its operands. Did you intend to either negate the entire comparison expression, in which case parentheses would be required around the entire comparison expression to force that interpretation, or negate the sense of the comparison (that is, use '>=' rather than '<')? This occurs as the logical operand of if.

6682 	        if (!virDomainSnapshotRedefinePrep(domain, vm, &def, &snap,
6683 	                                           &update_current, flags) < 0)


I believe that "!virDomain..." is the issue :-)

This also generated another Coverity issue regarding DEAD_ERROR_LINE
for the 'goto cleanup' that wouldn't be reached.

John


> +    if (redefine) {
> +        if (!virDomainSnapshotRedefinePrep(domain, vm, &def, &snap,
> +                                           &update_current, flags) < 0)
> +            goto cleanup;

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]