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/qcow2.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/qcow2.c')
-rw-r--r-- | block/qcow2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index ebad4e10ae..0ce71507e9 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -338,7 +338,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); |