diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-08-19 10:31:11 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-08-20 11:51:28 +0200 |
commit | d4df3dbc021d1bfd1be6e3fa94e0e20086fbf183 (patch) | |
tree | 5e850d8d1469a94e8181683e0c66d3b36d9aab7f /block/vhdx-log.c | |
parent | 08193dd52ba911077c9a29f62157bc4f3b9564eb (diff) | |
download | qemu-d4df3dbc021d1bfd1be6e3fa94e0e20086fbf183.zip qemu-d4df3dbc021d1bfd1be6e3fa94e0e20086fbf183.tar.gz qemu-d4df3dbc021d1bfd1be6e3fa94e0e20086fbf183.tar.bz2 |
block: Drop some superfluous casts from void *
They clutter the code. Unfortunately, I can't figure out how to make
Coccinelle drop all of them, so I have to settle for common special
cases:
@@
type T;
T *pt;
void *pv;
@@
- pt = (T *)pv;
+ pt = pv;
@@
type T;
@@
- (T *)
(\(g_malloc\|g_malloc0\|g_realloc\|g_new\|g_new0\|g_renew\|
g_try_malloc\|g_try_malloc0\|g_try_realloc\|
g_try_new\|g_try_new0\|g_try_renew\)(...))
Topped off with minor manual style cleanups.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/vhdx-log.c')
-rw-r--r-- | block/vhdx-log.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/vhdx-log.c b/block/vhdx-log.c index eb5c7a0..6547bec 100644 --- a/block/vhdx-log.c +++ b/block/vhdx-log.c @@ -923,7 +923,7 @@ static int vhdx_log_write(BlockDriverState *bs, BDRVVHDXState *s, buffer = qemu_blockalign(bs, total_length); memcpy(buffer, &new_hdr, sizeof(new_hdr)); - new_desc = (VHDXLogDescriptor *) (buffer + sizeof(new_hdr)); + new_desc = buffer + sizeof(new_hdr); data_sector = buffer + (desc_sectors * VHDX_LOG_SECTOR_SIZE); data_tmp = data; |