]> Git Repo - qemu.git/commit - hw/ide/microdrive.c
block: Drop some superfluous casts from void *
authorMarkus Armbruster <[email protected]>
Tue, 19 Aug 2014 08:31:11 +0000 (10:31 +0200)
committerKevin Wolf <[email protected]>
Wed, 20 Aug 2014 09:51:28 +0000 (11:51 +0200)
commitd4df3dbc021d1bfd1be6e3fa94e0e20086fbf183
tree5e850d8d1469a94e8181683e0c66d3b36d9aab7f
parent08193dd52ba911077c9a29f62157bc4f3b9564eb
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 <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Reviewed-by: Jeff Cody <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/vhdx-log.c
block/vvfat.c
hw/ide/microdrive.c
This page took 0.025783 seconds and 4 git commands to generate.