]> git.ipfire.org Git - thirdparty/libvirt.git/commit
bridge_driver: Introduce a helper for virNetworkObjSetMacMap()
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 9 Aug 2022 11:42:32 +0000 (13:42 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 9 Aug 2022 15:35:14 +0000 (17:35 +0200)
commit2efd0dd9c3873f963271a3eefbb11da1e16cb2ee
treef86829db1a930ac10224bb0664757dbec2bfa5cc
parent107dfcea34347fc3c525d925f81b0682d71b7410
bridge_driver: Introduce a helper for virNetworkObjSetMacMap()

Currently, whenever virNetworkObjSetMacMap() is called the same
pattern is used:

1) call virMacMapFileName() to generate a filename,
2) pass this filename to virMacMapNew(), and finally
3) pass retval from previous step to virNetworkObjSetMacMap().

Move this code into a helper (networkSetMacMap()) and replace
both pattern occurrences with its call.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/network/bridge_driver.c