From: Michal Privoznik Date: Wed, 1 Dec 2021 12:23:04 +0000 (+0100) Subject: qemuBuildMemoryDeviceProps: Fix const correctness X-Git-Tag: v8.1.0-rc1~281 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bad883787faf06ff10a7d892671302db178b0c97;p=thirdparty%2Flibvirt.git qemuBuildMemoryDeviceProps: Fix const correctness The @mem agrument of qemuBuildMemoryDeviceProps() function is only read from. Make this fact obvious from the function declaration too. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a18b1e615c..31d1d15adf 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4003,7 +4003,7 @@ qemuBuildMemoryDimmBackendStr(virCommand *cmd, virJSONValue * qemuBuildMemoryDeviceProps(const virDomainDef *def, - virDomainMemoryDef *mem) + const virDomainMemoryDef *mem) { g_autoptr(virJSONValue) props = NULL; const char *device = NULL; diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index dbdf3a4793..dd981e333f 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -154,7 +154,7 @@ int qemuBuildMemoryBackendProps(virJSONValue **backendProps, virJSONValue * qemuBuildMemoryDeviceProps(const virDomainDef *def, - virDomainMemoryDef *mem); + const virDomainMemoryDef *mem); /* Current, best practice */ virJSONValue *