vsh: Refactor vshCommandOptScaledInt

Fix control flow and spacing issues.
This commit is contained in:
Peter Krempa 2016-03-17 15:45:09 +01:00
parent b2c9d77b4e
commit 3f1b45de24

View File

@ -1143,18 +1143,16 @@ vshCommandOptScaledInt(vshControl *ctl, const vshCmd *cmd,
if ((ret = vshCommandOpt(cmd, name, &arg, true)) <= 0)
return ret;
if (virStrToLong_ullp(arg->data, &end, 10, value) < 0 ||
virScaleInteger(value, end, scale, max) < 0)
{
virScaleInteger(value, end, scale, max) < 0) {
vshError(ctl,
_("Scaled numeric value '%s' for <%s> option is malformed or "
"out of range"), arg->data, name);
ret = -1;
} else {
ret = 1;
return -1;
}
return ret;
return 1;
}