From: Ján Tomko Date: Thu, 14 Jan 2016 15:49:56 +0000 (+0100) Subject: leaseshelper: remove useless comparison X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d7049a67b6e6e3ba2bfe900686acc9bb5e2458da;p=libvirt.git 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. --- diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c index 1e5e3e80c8..eb1c0c78e5 100644 --- a/src/network/leaseshelper.c +++ b/src/network/leaseshelper.c @@ -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: