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