mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 16:26:59 +00:00
sort: Use a comparer instead of returner
This resolves the FIXME of sorting ranges according to first_ip in IPv6 mode.
This commit is contained in:
parent
4051a953bd
commit
137c1d37c2
2 changed files with 75 additions and 44 deletions
|
|
@ -223,12 +223,8 @@ 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 */
|
||||
unsigned long int (*returner) (struct range_t r);
|
||||
unsigned long int ret_ip(struct range_t r);
|
||||
unsigned long int ret_cur(struct range_t r);
|
||||
unsigned long int ret_max(struct range_t r);
|
||||
int (*comparer) (struct range_t *r1, struct range_t *r2);
|
||||
unsigned long int ret_percent(struct range_t r);
|
||||
unsigned long int ret_touched(struct range_t r);
|
||||
unsigned long int ret_tc(struct range_t r);
|
||||
unsigned long int ret_tcperc(struct range_t r);
|
||||
void field_selector(char c);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue