From: Peter Krempa Date: Fri, 20 Aug 2021 13:17:00 +0000 (+0200) Subject: qemuDomainSetLifecycleAction: Add a note about argument range-check X-Git-Tag: v7.7.0-rc1~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a640237b5309accccc85164a4e58999a17b7f865;p=thirdparty%2Flibvirt.git qemuDomainSetLifecycleAction: Add a note about argument range-check The public API wrapper range-checks the arguments. Save the next reader the hassle of looking it up. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 6e83d7e068..a86ff25822 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -19652,6 +19652,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);