]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf/domain_conf: use virStringParseYesNo helper
authorMao Zhongyi <maozhongyi@cmss.chinamobile.com>
Thu, 17 Oct 2019 03:19:31 +0000 (11:19 +0800)
committerCole Robinson <crobinso@redhat.com>
Thu, 14 Nov 2019 13:14:50 +0000 (08:14 -0500)
commit7ae802ebb3b43aea7e2f415ea62154e45070048c
tree6a699d505e0a8540884440961883522258668d53
parenta8ee07e0d13feca990de307e2eccdac42b5a21f5
conf/domain_conf: use virStringParseYesNo helper

This helper performs a conversion from a "yes|no" string
to a corresponding boolean, and several conversions were
already done, but there are still some omissions.

For most of the remaining usages in domain_conf.c only
"yes" is explicitly checked for. This means all other
values are implicitly handled as 'false'. In this case,
use virStringParseYesNo to handle the conversion and
reserve the original logic of not raise an error, so
ignore the return value of helper.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
src/conf/domain_conf.c