]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: monitor: json: Refactor error code class checker
authorPeter Krempa <pkrempa@redhat.com>
Thu, 9 Apr 2015 09:26:43 +0000 (11:26 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 14 Apr 2015 08:00:56 +0000 (10:00 +0200)
commit72613b18ac91add555688acc109f4171bdef4061
treebb1101758ee9c18827ff3b7c17280595515b122f
parent64985217bc57510cb9549200182be3691640e04b
qemu: monitor: json: Refactor error code class checker

Split out the function that checks the actual error class string into a
separate helper as it will be useful later and refactor
qemuMonitorJSONHasError to return bool type and remove few useless
checks.

Basically virJSONValueObjectHasKey are useless here since the next call
to virJSONValueObjectGet is checking the return value again (which can't
fail at that point). By removing the first check we save a function
call.
src/qemu/qemu_monitor_json.c