提交 d7049a67 编写于 作者: J Ján Tomko

leaseshelper: remove useless comparison

We do not care if the mac was specified in the delete section,
we are going to delete the record anyway.
上级 99569948
......@@ -416,7 +416,6 @@ main(int argc, char **argv)
*/
if (!mac)
break;
delete = true;
/* Create new lease */
if (!(lease_new = virJSONValueNewObject())) {
......@@ -448,14 +447,11 @@ main(int argc, char **argv)
if (expirytime && virJSONValueObjectAppendNumberLong(lease_new, "expiry-time", expirytime) < 0)
goto cleanup;
break;
/* fallthrough */
case VIR_LEASE_ACTION_DEL:
/* Delete the corresponding lease, if it already exists */
delete = true;
if (mac) {
/* Delete the corresponding lease, if it already exists */
delete = true;
}
break;
case VIR_LEASE_ACTION_INIT:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册