mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-18 00:37:01 +00:00
performance: add few restict and const key words
This should make the run to be couple percentages quicker. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
dbf3927c39
commit
b61c93b7a1
3 changed files with 5 additions and 5 deletions
|
|
@ -42,7 +42,7 @@
|
|||
#include "dhcpd-pools.h"
|
||||
|
||||
/* Clean up data */
|
||||
static int ip_sort(struct leases_t *a, struct leases_t *b)
|
||||
static int ip_sort(const struct leases_t *restrict a, const struct leases_t *restrict b)
|
||||
{
|
||||
if (a->ip < b->ip)
|
||||
return -1;
|
||||
|
|
@ -61,8 +61,8 @@ int prepare_data(void)
|
|||
/* Join leases and ranges into couter structs */
|
||||
int do_counting(void)
|
||||
{
|
||||
struct range_t *range_p;
|
||||
struct leases_t *l;
|
||||
struct range_t *restrict range_p;
|
||||
const struct leases_t *restrict l;
|
||||
unsigned long i, k, block_size;
|
||||
|
||||
range_p = ranges;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue