virmacmap: Fix variable handling

In virMacMapRemoveLocked() we have two variables: @macsList and
@newMacsList. Obviously, @newMacsList is supposed to hold pointer
to modified list but in fact it holds pointer to the old list.
It's confusing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2017-01-02 09:50:24 +01:00
parent fbd717c389
commit 806582a5d1

View File

@ -121,8 +121,8 @@ virMacMapRemoveLocked(virMacMapPtr mgr,
return 0;
newMacsList = macsList;
virStringListRemove(&macsList, mac);
if (!macsList) {
virStringListRemove(&newMacsList, mac);
if (!newMacsList) {
virHashSteal(mgr->macs, domain);
} else {
if (macsList != newMacsList &&