[libvirt] [PATCH 0/3] use virStringParseYesNo helper

Mao Zhongyi maozhongyi at cmss.chinamobile.com
Wed Oct 16 02:39:47 UTC 2019


A function virStringParseYesNo was added to convert
string 'yes' to true and 'no' to false, so use this
helper to replace 'STREQ(.*, \"yes\")' and
'STREQ(.*, \"no\")' as it allows us to drop several
repetitive if-then-else string->bool conversion blocks.

Cc: abologna at redhat.com
Cc: berrange at redhat.com
Cc: crobinso at redhat.com
Cc: gene at czarc.net
Cc: g.sho1500 at gmail.com
Cc: jdenemar at redhat.com
Cc: laine at laine.org
Cc: mkletzan at redhat.com
Cc: phrdina at redhat.com

Mao Zhongyi (3):
  conf/domain_conf: use virStringParseYesNo helper
  conf/network_conf: use virStringParseYesNo helper
  qemu/qemu_migration_params: use virStringParseYesNo helper

 src/conf/domain_conf.c           | 30 ++++++++++++++----------------
 src/conf/network_conf.c          |  4 +---
 src/qemu/qemu_migration_params.c |  6 +-----
 3 files changed, 16 insertions(+), 24 deletions(-)

-- 
2.17.1






More information about the libvir-list mailing list