diff options
author | Eric Blake <eblake@redhat.com> | 2017-04-27 16:58:15 -0500 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-05-08 20:32:14 +0200 |
commit | de6e7951fe66053dfeaac1a237f7aceb9e079619 (patch) | |
tree | ced0a9dc4f2798e16b0f773318de92683c39fdb6 /block/file-win32.c | |
parent | a2f3453ebc64b1ebe094aeaf83f9e67896f90ac3 (diff) |
qobject: Drop useless QObject casts
We have macros in place to make it less verbose to add a subtype
of QObject to both QDict and QList. While we have made cleanups
like this in the past (see commit fcfcd8ffc, for example), having
it be automated by Coccinelle makes it easier to maintain.
Patch created mechanically via:
spatch --sp-file scripts/coccinelle/qobject.cocci \
--macro-file scripts/cocci-macro-file.h --dir . --in-place
then I verified that no manual touchups were required.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20170427215821.19397-5-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'block/file-win32.c')
-rw-r--r-- | block/file-win32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/file-win32.c b/block/file-win32.c index 7872e00a21..c4a6be7f9f 100644 --- a/block/file-win32.c +++ b/block/file-win32.c @@ -281,7 +281,7 @@ static void raw_parse_filename(const char *filename, QDict *options, * function call can be ignored. */ strstart(filename, "file:", &filename); - qdict_put_obj(options, "filename", QOBJECT(qstring_from_str(filename))); + qdict_put(options, "filename", qstring_from_str(filename)); } static QemuOptsList raw_runtime_opts = { @@ -668,7 +668,7 @@ static void hdev_parse_filename(const char *filename, QDict *options, /* The prefix is optional, just as for "file". */ strstart(filename, "host_device:", &filename); - qdict_put_obj(options, "filename", QOBJECT(qstring_from_str(filename))); + qdict_put(options, "filename", qstring_from_str(filename)); } static int hdev_open(BlockDriverState *bs, QDict *options, int flags, |