mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-13 17:49:16 +00:00
4a3d6ed5ee
Rather than have virJSONValueArraySize return a -1 when the input is not an array and then splat an error message, let's check for an array before calling and then change the return to be a size_t instead of ssize_t. That means using the helper virJSONValueIsArray as well as using a more generic error message such as "Malformed <something> array". In some cases we can remove stack variables and when we cannot, those variables should be size_t not ssize_t. Alter a few references of if (!value) to be if (value == 0) instead as well. Some callers can already assume an array is being worked on based on the previous call, so there's less to do. Signed-off-by: John Ferlan <jferlan@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> |
||
---|---|---|
.. | ||
EVENTHANDLERS.txt | ||
libvirtd_qemu.aug | ||
Makefile.inc.am | ||
MIGRATION.txt | ||
qemu_agent.c | ||
qemu_agent.h | ||
qemu_alias.c | ||
qemu_alias.h | ||
qemu_block.c | ||
qemu_block.h | ||
qemu_blockjob.c | ||
qemu_blockjob.h | ||
qemu_capabilities.c | ||
qemu_capabilities.h | ||
qemu_capspriv.h | ||
qemu_cgroup.c | ||
qemu_cgroup.h | ||
qemu_command.c | ||
qemu_command.h | ||
qemu_conf.c | ||
qemu_conf.h | ||
qemu_domain_address.c | ||
qemu_domain_address.h | ||
qemu_domain.c | ||
qemu_domain.h | ||
qemu_driver.c | ||
qemu_driver.h | ||
qemu_hostdev.c | ||
qemu_hostdev.h | ||
qemu_hotplug.c | ||
qemu_hotplug.h | ||
qemu_hotplugpriv.h | ||
qemu_interface.c | ||
qemu_interface.h | ||
qemu_migration_cookie.c | ||
qemu_migration_cookie.h | ||
qemu_migration_params.c | ||
qemu_migration_params.h | ||
qemu_migration_paramspriv.h | ||
qemu_migration.c | ||
qemu_migration.h | ||
qemu_monitor_json.c | ||
qemu_monitor_json.h | ||
qemu_monitor_text.c | ||
qemu_monitor_text.h | ||
qemu_monitor.c | ||
qemu_monitor.h | ||
qemu_parse_command.c | ||
qemu_parse_command.h | ||
qemu_process.c | ||
qemu_process.h | ||
qemu_processpriv.h | ||
qemu_qapi.c | ||
qemu_qapi.h | ||
qemu_security.c | ||
qemu_security.h | ||
qemu.conf | ||
test_libvirtd_qemu.aug.in | ||
THREADS.txt |