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

2019-10-16 Thread maozy
On 10/16/19 3:51 PM, Andrea Bolognani wrote: On Wed, 2019-10-16 at 10:39 +0800, Mao Zhongyi wrote: 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

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

2019-10-16 Thread Andrea Bolognani
On Wed, 2019-10-16 at 10:39 +0800, Mao Zhongyi wrote: > 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

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

2019-10-15 Thread Mao Zhongyi
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: abolo...@redhat.com Cc: