From de6e7951fe66053dfeaac1a237f7aceb9e079619 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 27 Apr 2017 16:58:15 -0500 Subject: 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 Reviewed-by: Stefan Hajnoczi Reviewed-by: Alberto Garcia Reviewed-by: Markus Armbruster Message-Id: <20170427215821.19397-5-eblake@redhat.com> Signed-off-by: Markus Armbruster --- block/blkverify.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'block/blkverify.c') diff --git a/block/blkverify.c b/block/blkverify.c index af23281669..cc29cd2b54 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -288,13 +288,12 @@ static void blkverify_refresh_filename(BlockDriverState *bs, QDict *options) && s->test_file->bs->full_open_options) { QDict *opts = qdict_new(); - qdict_put_obj(opts, "driver", QOBJECT(qstring_from_str("blkverify"))); + qdict_put(opts, "driver", qstring_from_str("blkverify")); QINCREF(bs->file->bs->full_open_options); - qdict_put_obj(opts, "raw", QOBJECT(bs->file->bs->full_open_options)); + qdict_put(opts, "raw", bs->file->bs->full_open_options); QINCREF(s->test_file->bs->full_open_options); - qdict_put_obj(opts, "test", - QOBJECT(s->test_file->bs->full_open_options)); + qdict_put(opts, "test", s->test_file->bs->full_open_options); bs->full_open_options = opts; } -- cgit v1.2.1