Re: [PATCH v2 6/6] xenapi: Resolve Coverity FORWARD_NULL

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

 



Subject is technically right, but entirely misleading. This patch is
more a refactor of the code that fixes a coverity error rather than the
other way around.

On Fri, Sep 25, 2015 at 12:31:45 -0400, John Ferlan wrote:
> Coverity flagged that if the input 'mask'parameter was NULL, then the
> strtok_r call would have a NULL first and third parameter, which would
> cause an issue.
> 
> Although the caller doesn't call getCpuBitMapfromString with a non-NULL
> mask value, Coverity doesn't check that. A fix could have been to check

So a false positive again?

> the 'mask' in the function and keep Coverity happy; however, it was noted
> in a previous review that virBitmap* functions could be used instead.
> 
> So this patch modifies xenapiDomainGetVcpus to use virBitmap* functions
> and removes getCpuBitMapfromString in favor of those.
> 
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/xenapi/xenapi_driver.c | 12 +++++++-----
>  src/xenapi/xenapi_utils.c  | 21 ---------------------
>  src/xenapi/xenapi_utils.h  |  2 --
>  3 files changed, 7 insertions(+), 28 deletions(-)

This makes me like this patch though.

> 

ACK if you fix the commit message.

Peter

Attachment: signature.asc
Description: Digital signature

--
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]