[PATCH v1 1/5] qemuBuildMemoryDeviceProps: Fix const correctness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The @mem agrument of qemuBuildMemoryDeviceProps() function is
only read from. Make this fact obvious from the function
declaration too.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 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 bca867a492..fb87649e65 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4002,7 +4002,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 *
-- 
2.34.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux