Introduced by commit
1daa4ba33acf. vshCommandOptStringReq returns
0 on *success* or the option is not required && not present, both
are right result. Error out when returning 0 is not correct.
the caller, it doesn't have to check wether it
if (!(vol = vshCommandOptVol(ctl, cmd, "vol", "pool", NULL)))
return false;
- if (vshCommandOptStringReq(ctl, cmd, "capacity", &capacityStr) <= 0)
+ if (vshCommandOptStringReq(ctl, cmd, "capacity", &capacityStr) < 0)
goto cleanup;
virSkipSpaces(&capacityStr);
if (*capacityStr == '-') {