From 959bd87986ecaeabcd228220d1cabe07f6003827 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Wed, 23 Oct 2013 15:29:42 +0000 Subject: [PATCH] Fix build with gcc MFC after: 3 days --- usr.sbin/pkg/dns_utils.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.sbin/pkg/dns_utils.c b/usr.sbin/pkg/dns_utils.c index 55f52ec2122..ce88048a4aa 100644 --- a/usr.sbin/pkg/dns_utils.c +++ b/usr.sbin/pkg/dns_utils.c @@ -42,11 +42,11 @@ typedef union { static int srv_priority_cmp(const void *a, const void *b) { + const struct dns_srvinfo *da, *db; unsigned int r, l; - struct dns_srvinfo *da, *db; - da = *(struct dns_srvinfo **)a; - db = *(struct dns_srvinfo **)b; + da = *(struct dns_srvinfo * const *)a; + db = *(struct dns_srvinfo * const *)b; l = da->priority; r = db->priority; @@ -57,12 +57,12 @@ srv_priority_cmp(const void *a, const void *b) static int srv_final_cmp(const void *a, const void *b) { + const struct dns_srvinfo *da, *db; unsigned int r, l, wr, wl; int res; - struct dns_srvinfo *da, *db; - da = *(struct dns_srvinfo **)a; - db = *(struct dns_srvinfo **)b; + da = *(struct dns_srvinfo * const *)a; + db = *(struct dns_srvinfo * const *)b; l = da->priority; r = db->priority;