diff options
author | Kevin Wolf <kwolf@redhat.com> | 2010-05-05 11:44:39 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-05-17 10:20:05 +0200 |
commit | b666d239509a0855740444c254a65cbf567bfb90 (patch) | |
tree | e8d2539f1ad8d0c9578974bfe74fb5ad3b5008e4 /block/qcow.c | |
parent | 7a6f391376c61af1dce2d624a4fcff8eec4fa097 (diff) |
block: Avoid unchecked casts for AIOCBs
Use container_of for one direction and &acb->common for the other one.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow.c')
-rw-r--r-- | block/qcow.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qcow.c b/block/qcow.c index 2883c40f87..449858fa47 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -502,7 +502,7 @@ typedef struct QCowAIOCB { static void qcow_aio_cancel(BlockDriverAIOCB *blockacb) { - QCowAIOCB *acb = (QCowAIOCB *)blockacb; + QCowAIOCB *acb = container_of(blockacb, QCowAIOCB, common); if (acb->hd_aiocb) bdrv_aio_cancel(acb->hd_aiocb); qemu_aio_release(acb); |