[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 03/13] s390x: Drop useless casts
From: |
Eric Blake |
Subject: |
[Qemu-devel] [PATCH v3 03/13] s390x: Drop useless casts |
Date: |
Wed, 5 Apr 2017 14:47:31 -0500 |
An upcoming Coccinelle cleanup script wanted to reformat the casts
present in this file - but on closer look, we don't need the casts
at all because C automatically converts void* to any other pointer.
Signed-off-by: Eric Blake <address@hidden>
---
target/s390x/cpu_models.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 1434d15..ce461cc 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -376,12 +376,12 @@ static void cpu_model_from_info(S390CPUModel *model,
const CpuModelInfo *info,
static void qdict_add_disabled_feat(const char *name, void *opaque)
{
- qdict_put((QDict *) opaque, name, qbool_from_bool(false));
+ qdict_put(opaque, name, qbool_from_bool(false));
}
static void qdict_add_enabled_feat(const char *name, void *opaque)
{
- qdict_put((QDict *) opaque, name, qbool_from_bool(true));
+ qdict_put(opaque, name, qbool_from_bool(true));
}
/* convert S390CPUDef into a static CpuModelInfo */
--
2.9.3
- [Qemu-devel] [PATCH v3 00/13] qapi-related cleanups, Eric Blake, 2017/04/05
- [Qemu-devel] [PATCH v3 01/13] pci: Use struct instead of QDict to pass back parameters, Eric Blake, 2017/04/05
- [Qemu-devel] [PATCH v3 02/13] pci: Reduce scope of error injection, Eric Blake, 2017/04/05
- [Qemu-devel] [PATCH v3 04/13] coccinelle: Add script to remove useless QObject casts, Eric Blake, 2017/04/05
- [Qemu-devel] [PATCH v3 03/13] s390x: Drop useless casts,
Eric Blake <=
- [Qemu-devel] [PATCH v3 06/13] qobject: Add helper macros for common scalar insertions, Eric Blake, 2017/04/05
- [Qemu-devel] [PATCH v3 05/13] qobject: Drop useless QObject casts, Eric Blake, 2017/04/05
- [Qemu-devel] [PATCH v3 08/13] tests: Use simpler QDict/QList scalar insertion macros, Eric Blake, 2017/04/05