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.
This commit is contained in:
Ján Tomko 2016-01-14 16:49:56 +01:00
parent 99569948d3
commit d7049a67b6

View File

@ -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: