From: Michal Privoznik Date: Wed, 13 May 2020 09:57:37 +0000 (+0200) Subject: virNetDevOpenvswitchGetVhostuserIfname: Fix const correctness X-Git-Tag: v6.4.0-rc1~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4408decbdce51befd902bfbd45bbc9d902a2e4a;p=thirdparty%2Flibvirt.git 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 --- 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;