stroke: Lease enumerator is always defined
authorTobias Brunner <tobias@strongswan.org>
Fri, 7 Sep 2018 09:03:29 +0000 (11:03 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 11 Sep 2018 16:18:50 +0000 (18:18 +0200)
This function is only called for existing pools (under the protection of
a read lock).

src/libcharon/plugins/stroke/stroke_list.c

index 392eac8..d767148 100644 (file)
@@ -1059,7 +1059,7 @@ static void pool_leases(private_stroke_list_t *this, FILE *out, char *pool,
        fprintf(out, "Leases in pool '%s', usage: %u/%u, %u online\n",
                        pool, online + offline, size, online);
        enumerator = this->attribute->create_lease_enumerator(this->attribute, pool);
-       while (enumerator && enumerator->enumerate(enumerator, &id, &lease, &on))
+       while (enumerator->enumerate(enumerator, &id, &lease, &on))
        {
                if (!address || address->ip_equals(address, lease))
                {