mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
Monitor: remove unneeded checks
It's not needed to check the return of qobject_from_jsonf() anymore, as an assert() has been added there. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
668e3cac4f
commit
ba14414174
4 changed files with 0 additions and 12 deletions
3
block.c
3
block.c
|
@ -1301,7 +1301,6 @@ void bdrv_info(Monitor *mon, QObject **ret_data)
|
|||
"'removable': %i, 'locked': %i }",
|
||||
bs->device_name, type, bs->removable,
|
||||
bs->locked);
|
||||
assert(bs_obj != NULL);
|
||||
|
||||
if (bs->drv) {
|
||||
QObject *obj;
|
||||
|
@ -1312,7 +1311,6 @@ void bdrv_info(Monitor *mon, QObject **ret_data)
|
|||
bs->filename, bs->read_only,
|
||||
bs->drv->format_name,
|
||||
bdrv_is_encrypted(bs));
|
||||
assert(obj != NULL);
|
||||
if (bs->backing_file[0] != '\0') {
|
||||
QDict *qdict = qobject_to_qdict(obj);
|
||||
qdict_put(qdict, "backing_file",
|
||||
|
@ -1398,7 +1396,6 @@ void bdrv_info_stats(Monitor *mon, QObject **ret_data)
|
|||
bs->device_name,
|
||||
bs->rd_bytes, bs->wr_bytes,
|
||||
bs->rd_ops, bs->wr_ops);
|
||||
assert(obj != NULL);
|
||||
qlist_append_obj(devices, obj);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue