mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
analyze: use simpler comparison
In some cases the this can make run time to take 2.5% less time. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
5714e95228
commit
7a86746710
1 changed files with 3 additions and 1 deletions
|
|
@ -66,11 +66,13 @@ int do_counting(void)
|
|||
unsigned long i, k, block_size;
|
||||
|
||||
range_p = ranges;
|
||||
unsigned long r_end;
|
||||
|
||||
/* Walk through ranges */
|
||||
for (i = 0; i < num_ranges; i++) {
|
||||
/* Count IPs in use */
|
||||
for (l = leases; l != NULL && range_p->last_ip >= l->ip; l = l->hh.next) {
|
||||
r_end = range_p->last_ip + 1;
|
||||
for (l = leases; l != NULL && l->ip < r_end; l = l->hh.next) {
|
||||
if (l->ip < range_p->first_ip) {
|
||||
/* should not be necessary */
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue