From: Michal Privoznik <[email protected]>

The 'resourceType' variable inside of hypervDomainAttachSerial()
is declared as both g_autofree and const. This makes no sense.
Since the variable is g_strdup_printf()-ed into a couple of lines
later, it's not const. Drop that part of variable declaration.

Signed-off-by: Michal Privoznik <[email protected]>
---
 src/hyperv/hyperv_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index 0c17ef16ec..8dd56f39dc 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -974,7 +974,7 @@ hypervDomainAttachSerial(virDomainPtr domain, 
virDomainChrDef *serial)
     Msvm_ResourceAllocationSettingData *entry = NULL;
     g_autoptr(GHashTable) serialResource = NULL;
     const char *connectionValue = NULL;
-    g_autofree const char *resourceType = NULL;
+    g_autofree char *resourceType = NULL;
 
     virUUIDFormat(domain->uuid, uuid_string);
 
-- 
2.52.0

Reply via email to