[PATCH REPOST 1/6] conf: Fix prototype/definition for virStoragePoolObj get functions

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

 



Modify virStoragePoolObjGetAutostartLink and
virStoragePoolObjGetConfigFile to return "const char *"
since that's how both are used and to ensure no one
tries to VIR_FREE the result.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/conf/virstorageobj.c | 4 ++--
 src/conf/virstorageobj.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index 1364bddd15..ff04c9efe4 100644
--- a/src/conf/virstorageobj.c
+++ b/src/conf/virstorageobj.c
@@ -89,7 +89,7 @@ virStoragePoolObjDefUseNewDef(virStoragePoolObjPtr obj)
 }
 
 
-char *
+const char *
 virStoragePoolObjGetConfigFile(virStoragePoolObjPtr obj)
 {
     return obj->configFile;
@@ -105,7 +105,7 @@ virStoragePoolObjSetConfigFile(virStoragePoolObjPtr obj,
 }
 
 
-char *
+const char *
 virStoragePoolObjGetAutostartLink(virStoragePoolObjPtr obj)
 {
     return obj->autostartLink;
diff --git a/src/conf/virstorageobj.h b/src/conf/virstorageobj.h
index b65b16019c..cf7ee06cd1 100644
--- a/src/conf/virstorageobj.h
+++ b/src/conf/virstorageobj.h
@@ -86,14 +86,14 @@ virStoragePoolObjGetNewDef(virStoragePoolObjPtr obj);
 void
 virStoragePoolObjDefUseNewDef(virStoragePoolObjPtr obj);
 
-char *
+const char *
 virStoragePoolObjGetConfigFile(virStoragePoolObjPtr obj);
 
 void
 virStoragePoolObjSetConfigFile(virStoragePoolObjPtr obj,
                                char *configFile);
 
-char *
+const char *
 virStoragePoolObjGetAutostartLink(virStoragePoolObjPtr obj);
 
 bool
-- 
2.13.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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