From c4408decbdce51befd902bfbd45bbc9d902a2e4a Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Wed, 13 May 2020 11:57:37 +0200 Subject: [PATCH] virNetDevOpenvswitchGetVhostuserIfname: Fix const correctness 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 --- 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;