Skip to content

Commit e193d4b

Browse files
kevmwphilmd
authored andcommitted
block: Remove unnecessary NULL check in bdrv_pad_request()
Coverity complains that the check introduced in commit 3f93481 suggests that qiov could be NULL and we dereference it before reaching the check. In fact, all of the callers pass a non-NULL pointer, so just remove the misleading check. Resolves: Coverity CID 1542668 Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com> Message-ID: <20240327192750.204197-1-kwolf@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
1 parent aab1b3e commit e193d4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1730,7 +1730,7 @@ static int bdrv_pad_request(BlockDriverState *bs,
17301730
* For prefetching in stream_populate(), no qiov is passed along, because
17311731
* only copy-on-read matters.
17321732
*/
1733-
if (qiov && *qiov) {
1733+
if (*qiov) {
17341734
sliced_iov = qemu_iovec_slice(*qiov, *qiov_offset, *bytes,
17351735
&sliced_head, &sliced_tail,
17361736
&sliced_niov);

0 commit comments

Comments
 (0)