On Thu, Dec 22, 2016 at 07:36:14PM +0530, Nitesh Konkar wrote:
Avoid unnecessary calling of function vshCommandOptStringReq.
In the current code the function vshCommandOptStringReq is
called irrespective of whether --enable and/or --disable is
present in the command line. Eg: 'virsh perf domainName'
also results in calling this function twice. This patch
fixes this.
With this patch you're now calling vshCommandOpt() anyway, which is the
biggest part of vshCommandOpt*() and in addition you call it multiple
times if the option is on the command line. That feels stupid.