[PATCH 02/22] qemuDomainSetLifecycleAction: Add a note about argument range-check
Peter Krempa
pkrempa at redhat.com
Tue Aug 24 14:44:23 UTC 2021
The public API wrapper range-checks the arguments. Save the next reader
the hassle of looking it up.
Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
src/qemu/qemu_driver.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 444e9e5cbc..2de17aaa4e 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -19654,6 +19654,8 @@ qemuDomainSetLifecycleAction(virDomainPtr dom,
virDomainDef *persistentDef = NULL;
int ret = -1;
+ /* note that 'action' and 'type' are range-checked in the public API wrapper */
+
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
VIR_DOMAIN_AFFECT_CONFIG, -1);
--
2.31.1
More information about the libvir-list
mailing list