From owner-svn-src-head@FreeBSD.ORG Mon Jul 28 14:32:21 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85B2230D; Mon, 28 Jul 2014 14:32:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73B042197; Mon, 28 Jul 2014 14:32:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s6SEWL6H092758; Mon, 28 Jul 2014 14:32:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s6SEWLh7092757; Mon, 28 Jul 2014 14:32:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407281432.s6SEWLh7092757@svn.freebsd.org> From: Alexander Motin Date: Mon, 28 Jul 2014 14:32:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269191 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2014 14:32:21 -0000 Author: mav Date: Mon Jul 28 14:32:20 2014 New Revision: 269191 URL: http://svnweb.freebsd.org/changeset/base/269191 Log: Fix r269183 build woth GCC. MFC after: 2 weeks Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Mon Jul 28 14:27:05 2014 (r269190) +++ head/usr.sbin/ctld/ctld.c Mon Jul 28 14:32:20 2014 (r269191) @@ -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])