From 2008e1a047049e57edc16bcb28891e8562b0dcd0 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 9 Dec 2012 22:27:58 +0000 Subject: [PATCH] clean up: remove unused functions Signed-off-by: Sami Kerola --- src/dhcpd-pools.h | 3 --- src/sort.c | 14 -------------- 2 files changed, 17 deletions(-) diff --git a/src/dhcpd-pools.h b/src/dhcpd-pools.h index a429398..f7c3ab6 100644 --- a/src/dhcpd-pools.h +++ b/src/dhcpd-pools.h @@ -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); diff --git a/src/sort.c b/src/sort.c index 3bd1719..cd0ed81 100644 --- a/src/sort.c +++ b/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.