curl: qemu_bh_new() can never return NULL
PATCH 1/1 curl: qemu_bh_new() can never return NULL
Drop error code path which cannot be taken since qemu_bh_new() does not return NULL.
Signed-off-by Stefan Hajnoczi <[email protected]>
--- block/curl.c | 6 ------ 1 file changed, 6 deletions(-)
block/curl.c +0 -6
@@ -572,12 +572,6 @@ static BlockDriverAIOCB *curl_aio_readv(BlockDriverState *bs, acb->nb_sectors = nb_sectors; acb->bh =qemu_bh_new (curl_readv_bh_cb, acb); - -if (!acb->bh) { -DPRINTF ("CURL: qemu_bh_new failed\n" ); -return NULL ; - } -qemu_bh_schedule (acb->bh);return &acb->common; }
Signature · 1 line
1.8.3.1
Il 26/08/2013 13:38, Stefan Hajnoczi ha scritto:
Quoted 16 lines
Drop error code path which cannot be taken since
qemu_bh_new()does not return NULL.Signed-off-by Stefan Hajnoczi <[email protected]>--- block/curl.c | 6 ------ 1 file changed, 6 deletions(-)block/curl.c +0
-0@@ -572,12 +572,6 @@ static BlockDriverAIOCB *curl_aio_readv(BlockDriverState *bs, acb->nb_sectors = nb_sectors;
block/curl.c static BlockDriverAIOCB *curl_aio_readv(BlockDriverState *bs, · line 577
Quoted 10 lines
block/curl.c +0
-6acb->bh =qemu_bh_new (curl_readv_bh_cb, acb); - -if (!acb->bh) { -DPRINTF ("CURL: qemu_bh_new failed\n" ); -return NULL ; - } -qemu_bh_schedule (acb->bh);return &acb->common; }
Reviewed-by Paolo Bonzini <[email protected]>
Michael Tokarev
AppliedQuoted 2 lines · Stefan Hajnoczi
Drop error code path which cannot be taken since
qemu_bh_new()does not return NULL.
Thanks, applied to the trivial-patches queue.
/mjt