Date: Tue, 28 Feb 2006 00:24:10 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 92498 for review Message-ID: <200602280024.k1S0OAbG063792@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/types.h> @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602280024.k1S0OAbG063792>