From owner-p4-projects@FreeBSD.ORG Tue Feb 28 00:24:11 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0E5F016A423; Tue, 28 Feb 2006 00:24:11 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ACE6D16A420 for ; Tue, 28 Feb 2006 00:24:10 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7138843D45 for ; Tue, 28 Feb 2006 00:24:10 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k1S0OANv063795 for ; Tue, 28 Feb 2006 00:24:10 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k1S0OAbG063792 for perforce@freebsd.org; Tue, 28 Feb 2006 00:24:10 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 28 Feb 2006 00:24:10 GMT Message-Id: <200602280024.k1S0OAbG063792@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 92498 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2006 00:24:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=92498 Change 92498 by rwatson@rwatson_peppercorn on 2006/02/28 00:23:33 Avoid unsightly and unportable grubbing around in 32-bit fields of struct in6_addr. Linux and Solaris have the same structure fields, but each with their own subtly different naming conventions. Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#32 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#32 (text+ko) ==== @@ -31,7 +31,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#31 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#32 $ */ #include @@ -397,10 +397,7 @@ break; case AU_IPv6: - ipv6.__u6_addr.__u6_addr32[0] = ipaddr[0]; - ipv6.__u6_addr.__u6_addr32[1] = ipaddr[1]; - ipv6.__u6_addr.__u6_addr32[2] = ipaddr[2]; - ipv6.__u6_addr.__u6_addr32[3] = ipaddr[3]; + bcopy(ipaddr, &ipv6, sizeof(ipv6)); fprintf(fp, "%s", inet_ntop(AF_INET6, &ipv6, dst, INET6_ADDRSTRLEN)); break;