mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
clean up: remove unused functions
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
f1411858cb
commit
2008e1a047
2 changed files with 0 additions and 17 deletions
|
|
@ -211,14 +211,11 @@ void print_version(void) __attribute__ ((noreturn));
|
|||
void usage(int status) __attribute__ ((noreturn));
|
||||
/* qsort required functions... */
|
||||
/* ...for ranges and... */
|
||||
int intcomp(const void *__restrict x, const void *__restrict y)
|
||||
__attribute__ ((nonnull(1, 2)));
|
||||
int ipcomp(const union ipaddr_t *restrict a, const union ipaddr_t *restrict b);
|
||||
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 */
|
||||
int sort_name(void);
|
||||
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);
|
||||
|
|
|
|||
14
src/sort.c
14
src/sort.c
|
|
@ -47,20 +47,6 @@
|
|||
|
||||
#include "dhcpd-pools.h"
|
||||
|
||||
/*! \brief Compare unsigned 32 bit integers. Suitable for IPv4 sorting.
|
||||
* \param x Binary IPv4 address.
|
||||
* \param y Binary IPv4 address.
|
||||
* \return If x < y return -1, if y < x return 1, when they are equal return 0.
|
||||
*/
|
||||
int intcomp(const void *restrict x, const void *restrict y)
|
||||
{
|
||||
if (*(uint32_t *) x < *(uint32_t *) y)
|
||||
return -1;
|
||||
if (*(uint32_t *) y < *(uint32_t *) x)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief Compare IP address, with IPv4/v6 determination.
|
||||
* \param a Binary IP address.
|
||||
* \param b Binary IP address.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue