mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-18 00:37:01 +00:00
analyze, getdata: write functions in frequency order
According to test data free is seen most often in leases file. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
72a41d8086
commit
5f59daa692
2 changed files with 20 additions and 15 deletions
|
|
@ -84,12 +84,12 @@ int do_counting(void)
|
|||
}
|
||||
/* IP in range */
|
||||
switch (l->type) {
|
||||
case ACTIVE:
|
||||
range_p->count++;
|
||||
break;
|
||||
case FREE:
|
||||
range_p->touched++;
|
||||
break;
|
||||
case ACTIVE:
|
||||
range_p->count++;
|
||||
break;
|
||||
case BACKUP:
|
||||
range_p->backups++;
|
||||
break;
|
||||
|
|
@ -97,12 +97,12 @@ int do_counting(void)
|
|||
|
||||
if (range_p->shared_net) {
|
||||
switch (l->type) {
|
||||
case ACTIVE:
|
||||
range_p->shared_net->used++;
|
||||
break;
|
||||
case FREE:
|
||||
range_p->shared_net->touched++;
|
||||
break;
|
||||
case ACTIVE:
|
||||
range_p->shared_net->used++;
|
||||
break;
|
||||
case BACKUP:
|
||||
range_p->shared_net->backups++;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue