From bad883787faf06ff10a7d892671302db178b0c97 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Wed, 1 Dec 2021 13:23:04 +0100 Subject: [PATCH] qemuBuildMemoryDeviceProps: Fix const correctness MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_command.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 *