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 <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2020-05-13 11:57:37 +02:00
parent 6c0af6be64
commit c4408decbd

View File

@ -483,7 +483,7 @@ int
virNetDevOpenvswitchGetVhostuserIfname(const char *path, virNetDevOpenvswitchGetVhostuserIfname(const char *path,
char **ifname) char **ifname)
{ {
char *tmpIfname = NULL; const char *tmpIfname = NULL;
int status; int status;
int ret = -1; int ret = -1;
g_autoptr(virCommand) cmd = NULL; g_autoptr(virCommand) cmd = NULL;