]> git.proxmox.com Git - mirror_qemu.git/commit - monitor.c
qobject: Modify qobject_ref() to return obj
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 19 Apr 2018 15:01:44 +0000 (17:01 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 4 May 2018 06:27:53 +0000 (08:27 +0200)
commitf5a74a5a50387c6f980b2e2f94f062487a1826da
treeeefbe4d2f8bb0f889c9643d140fd702f131c4fd0
parentcb3e7f08aeaab0ab13e629ce8496dca150a449ba
qobject: Modify qobject_ref() to return obj

For convenience and clarity, make it possible to call qobject_ref() at
the time when the reference is associated with a variable, or
argument, by making qobject_ref() return the same pointer as given.
Use that to simplify the callers.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180419150145.24795-5-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Useless change to qobject_ref_impl() dropped, commit message improved
slightly]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
12 files changed:
block.c
block/blkdebug.c
block/blkverify.c
block/null.c
block/nvme.c
block/quorum.c
include/qapi/qmp/qnull.h
include/qapi/qmp/qobject.h
monitor.c
qapi/qobject-input-visitor.c
qapi/qobject-output-visitor.c
qobject/qdict.c