提交 3f1b45de 编写于 作者: P Peter Krempa

vsh: Refactor vshCommandOptScaledInt

Fix control flow and spacing issues.
上级 b2c9d77b
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册