提交 96aa6052 编写于 作者: J John Ferlan

domain_conf: Resolve Coverity COPY_PASTE_ERROR

Seems when commit id 'ea130e3b' added the checks to ensure each of
the hard_limit, soft_limit, and swap_hard_limit wasn't set at
VIR_DOMAIN_MEMORY_PARAM_UNLIMITED - a copy/paste error of using
the 'hard_limit' for each comparison was done. Adjust the code.
上级 f26e6397
......@@ -18088,9 +18088,9 @@ virDomainDefFormatInternal(virDomainDefPtr def,
if ((def->mem.hard_limit &&
def->mem.hard_limit != VIR_DOMAIN_MEMORY_PARAM_UNLIMITED) ||
(def->mem.soft_limit &&
def->mem.hard_limit != VIR_DOMAIN_MEMORY_PARAM_UNLIMITED) ||
def->mem.soft_limit != VIR_DOMAIN_MEMORY_PARAM_UNLIMITED) ||
(def->mem.swap_hard_limit &&
def->mem.hard_limit != VIR_DOMAIN_MEMORY_PARAM_UNLIMITED) ||
def->mem.swap_hard_limit != VIR_DOMAIN_MEMORY_PARAM_UNLIMITED) ||
def->mem.min_guarantee) {
virBufferAddLit(buf, "<memtune>\n");
virBufferAdjustIndent(buf, 2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册