]> git.proxmox.com Git - mirror_qemu.git/commit
tests: Don't check qobject_type() before qobject_to_qfloat()
authorMarkus Armbruster <armbru@redhat.com>
Fri, 17 Feb 2017 20:38:22 +0000 (21:38 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 22 Feb 2017 18:52:11 +0000 (19:52 +0100)
commit8978b34af3250354e0b67340a7e920f909beda13
tree75069682843ff04004f7b11c76607e961be1e510
parent0abfc4b885566eb41c3a4e1de5e2e105bdc062d9
tests: Don't check qobject_type() before qobject_to_qfloat()

qobject_to_qfloat(obj) returns NULL when obj isn't a QFloat.  Check
that instead of qobject_type(obj) == QTYPE_QFLOAT.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1487363905-9480-12-git-send-email-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
tests/check-qjson.c
tests/test-qobject-output-visitor.c