]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuAgentGetInterfaceAddresses: turn ifname into char*
authorJán Tomko <jtomko@redhat.com>
Mon, 5 Oct 2020 20:35:34 +0000 (22:35 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 8 Oct 2020 09:16:08 +0000 (11:16 +0200)
commit3b9432fa28ee56c5d632a2ee9c03e94efe670846
treeed19bdf892b6527c23c14d9060881ef9662b0098
parentddc2e5176799aa92909d8d333218c3e5a7f6bcfe
qemuAgentGetInterfaceAddresses: turn ifname into char*

We only care about the first part of the 'ifname' string,
splitting it is overkill.

Instead, just replace the ':' with a '\0' in a copy of the string.
This reduces the count of the varaibles containing some form
of the interface name to two.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
src/qemu/qemu_agent.c