[PATCH 4/5] virNetDevOpenvswitchGetVhostuserIfname: Fix const correctness

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

 



The @tmpIfname is a pointer into a const string. To avoid
mistakenly changing the const string via the pointer, make the
pointer const too.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/util/virnetdevopenvswitch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c
index c4cf2cf476..bc6a130035 100644
--- a/src/util/virnetdevopenvswitch.c
+++ b/src/util/virnetdevopenvswitch.c
@@ -483,7 +483,7 @@ int
 virNetDevOpenvswitchGetVhostuserIfname(const char *path,
                                        char **ifname)
 {
-    char *tmpIfname = NULL;
+    const char *tmpIfname = NULL;
     int status;
     int ret = -1;
     g_autoptr(virCommand) cmd = NULL;
-- 
2.26.2




[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