Skip to content
  • Eric Blake's avatar
    c0b21f2e
    nbd: Silence Coverity false positive · c0b21f2e
    Eric Blake authored
    
    
    Coverity noticed (CID 1436125) that we check the return value of
    nbd_extent_array_add in most places, but not at the end of
    bitmap_to_extents().  The return value exists to break loops before a
    future iteration, so there is nothing to check if we are already done
    iterating.  Adding a cast to void, plus a comment why, pacifies
    Coverity.
    
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Message-Id: <20201111163510.713855-1-eblake@redhat.com>
    [eblake: Prefer cast to void over odd && usage]
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    c0b21f2e
    nbd: Silence Coverity false positive
    Eric Blake authored
    
    
    Coverity noticed (CID 1436125) that we check the return value of
    nbd_extent_array_add in most places, but not at the end of
    bitmap_to_extents().  The return value exists to break loops before a
    future iteration, so there is nothing to check if we are already done
    iterating.  Adding a cast to void, plus a comment why, pacifies
    Coverity.
    
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Message-Id: <20201111163510.713855-1-eblake@redhat.com>
    [eblake: Prefer cast to void over odd && usage]
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Loading