mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 07:47:00 +00:00
analyze: use while() when for() is less fit to purpose
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
d26c858c13
commit
1b35a16d95
1 changed files with 2 additions and 2 deletions
|
|
@ -65,8 +65,8 @@ void do_counting(void)
|
|||
/* Walk through ranges */
|
||||
range_p = ranges;
|
||||
for (i = 0; i < num_ranges; i++) {
|
||||
for (; l != NULL && ipcomp(&range_p->first_ip, &l->ip) < 0; l = l->hh.prev)
|
||||
/* rewind */ ;
|
||||
while (l != NULL && ipcomp(&range_p->first_ip, &l->ip) < 0)
|
||||
l = l->hh.prev; /* rewind */
|
||||
if (l == NULL)
|
||||
l = leases;
|
||||
for (; l != NULL && ipcomp(&l->ip, &range_p->last_ip) <= 0; l = l->hh.next) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue