summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ctld/ctld.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2014-07-28 14:32:20 +0000
committermav <mav@FreeBSD.org>2014-07-28 14:32:20 +0000
commiteb1bbc24aa79cab3fbaf34f9e196c279a47c8007 (patch)
treea5c80e5450ea173937067f20683c4652238ee871 /usr.sbin/ctld/ctld.c
parentf864cbc2488dae7c302aad1653efa864f3fb36c0 (diff)
downloadFreeBSD-src-eb1bbc24aa79cab3fbaf34f9e196c279a47c8007.zip
FreeBSD-src-eb1bbc24aa79cab3fbaf34f9e196c279a47c8007.tar.gz
Fix r269183 build woth GCC.
MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/ctld/ctld.c')
-rw-r--r--usr.sbin/ctld/ctld.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/usr.sbin/ctld/ctld.c b/usr.sbin/ctld/ctld.c
index d2580b9..c14be21 100644
--- a/usr.sbin/ctld/ctld.c
+++ b/usr.sbin/ctld/ctld.c
@@ -393,18 +393,23 @@ const struct auth_portal *
auth_portal_find(const struct auth_group *ag, const struct sockaddr_storage *ss)
{
const struct auth_portal *ap;
- uint8_t *a, *b, bmask;
+ const uint8_t *a, *b;
int i;
+ uint8_t bmask;
TAILQ_FOREACH(ap, &ag->ag_portals, ap_next) {
if (ap->ap_sa.ss_family != ss->ss_family)
continue;
if (ss->ss_family == AF_INET) {
- a = (uint8_t *)&((struct sockaddr_in *)ss)->sin_addr;
- b = (uint8_t *)&((struct sockaddr_in *)&ap->ap_sa)->sin_addr;
+ a = (const uint8_t *)
+ &((const struct sockaddr_in *)ss)->sin_addr;
+ b = (const uint8_t *)
+ &((const struct sockaddr_in *)&ap->ap_sa)->sin_addr;
} else {
- a = (uint8_t *)&((struct sockaddr_in6 *)ss)->sin6_addr;
- b = (uint8_t *)&((struct sockaddr_in6 *)&ap->ap_sa)->sin6_addr;
+ a = (const uint8_t *)
+ &((const struct sockaddr_in6 *)ss)->sin6_addr;
+ b = (const uint8_t *)
+ &((const struct sockaddr_in6 *)&ap->ap_sa)->sin6_addr;
}
for (i = 0; i < ap->ap_mask / 8; i++) {
if (a[i] != b[i])
OpenPOWER on IntegriCloud