提交 806582a5 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
上级 fbd717c3
......@@ -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 &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册