mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
analyze: remove unnecessary function
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
20ec1c2b42
commit
5189333c95
3 changed files with 1 additions and 13 deletions
|
|
@ -51,7 +51,7 @@
|
|||
int prepare_data(void)
|
||||
{
|
||||
/* Sort leases */
|
||||
HASH_SORT(leases, leasecomp);
|
||||
HASH_SORT(leases, ipcomp);
|
||||
/* Sort ranges */
|
||||
qsort(ranges, (size_t)num_ranges, sizeof(struct range_t), &rangecomp);
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -230,7 +230,6 @@ int comp_percent(struct range_t *r1, struct range_t *r2);
|
|||
int comp_tc(struct range_t *r1, struct range_t *r2);
|
||||
int comp_tcperc(struct range_t *r1, struct range_t *r2);
|
||||
int comp_touched(struct range_t *r1, struct range_t *r2);
|
||||
int leasecomp(const void *restrict a, const void *restrict b);
|
||||
int rangecomp(const void *__restrict r1, const void *__restrict r2)
|
||||
__attribute__ ((nonnull(1, 2)));
|
||||
/* sort function pointer and functions */
|
||||
|
|
|
|||
11
src/sort.c
11
src/sort.c
|
|
@ -67,17 +67,6 @@ int ipcomp(const union ipaddr_t *restrict a, const union ipaddr_t *restrict b)
|
|||
}
|
||||
}
|
||||
|
||||
/*! \brief Compare IP address in leases. Suitable for sorting leases.
|
||||
* \param a A lease structure.
|
||||
* \param b A lease structure.
|
||||
* \return Return pas through from ipcomp.
|
||||
*/
|
||||
int leasecomp(const void *restrict a, const void *restrict b)
|
||||
{
|
||||
return ipcomp(&((const struct leases_t *)a)->ip,
|
||||
&((const struct leases_t *)b)->ip);
|
||||
}
|
||||
|
||||
/*! \brief Compare IP address in leases. Suitable for sorting range table.
|
||||
* \param r1 A range structure.
|
||||
* \param r2 A range structure.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue