headers: include-what-you-use fixes
[debian/dhcpd-pools.git] / src / sort.c
index 3ab7a47..460f4cd 100644 (file)
 ** along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
+#include <err.h>
+#include <errno.h>
 #include <stdlib.h>
-#include <stdio.h>
 #include <string.h>
-#include <errno.h>
-#include <err.h>
 
 #include "dhcpd-pools.h"
-#include "defaults.h"
 
 /* Sort functions for range sorting */
 int intcomp(const void *x, const void *y)
@@ -119,7 +114,7 @@ void field_selector(char c)
        default:
                warnx("field_selector: unknown sort order `%c'", c);
                errx(EXIT_FAILURE, "Try `%s --help' for more information.",
-                       program_invocation_short_name);
+                    program_invocation_short_name);
        }
 }
 
@@ -167,6 +162,8 @@ void mergesort_ranges(struct range_t *orig, int size, struct range_t *temp)
 {
        int left, right, i;
        struct range_t hold;
+       /* Merge sort split size */
+       static const int MIN_MERGE_SIZE = 8;
 
        if (size < MIN_MERGE_SIZE) {
                for (left = 0; left < size; left++) {