mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
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:
parent
99569948d3
commit
d7049a67b6
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user