Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/bind/dist/lib/dns avoid type punning



details:   https://anonhg.NetBSD.org/src/rev/aba9eed9d280
branches:  trunk
changeset: 769547:aba9eed9d280
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Sep 13 19:35:12 2011 +0000

description:
avoid type punning

diffstat:

 external/bsd/bind/dist/lib/dns/sdlz.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 09f684961966 -r aba9eed9d280 external/bsd/bind/dist/lib/dns/sdlz.c
--- a/external/bsd/bind/dist/lib/dns/sdlz.c     Tue Sep 13 19:34:27 2011 +0000
+++ b/external/bsd/bind/dist/lib/dns/sdlz.c     Tue Sep 13 19:35:12 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdlz.c,v 1.3 2011/09/11 18:55:37 christos Exp $        */
+/*     $NetBSD: sdlz.c,v 1.4 2011/09/13 19:35:12 christos Exp $        */
 
 /*
  * Portions Copyright (C) 2005-2011  Internet Systems Consortium, Inc. ("ISC")
@@ -472,13 +472,16 @@
 createnode(dns_sdlz_db_t *sdlz, dns_sdlznode_t **nodep) {
        dns_sdlznode_t *node;
        isc_result_t result;
+       void *sdlzv, *tdlzv;
 
        node = isc_mem_get(sdlz->common.mctx, sizeof(dns_sdlznode_t));
        if (node == NULL)
                return (ISC_R_NOMEMORY);
 
        node->sdlz = NULL;
-       attach((dns_db_t *)sdlz, (dns_db_t **)&node->sdlz);
+       sdlzv = sdlz;
+       tdlzv = &node->sdlz;
+       attach(sdlzv, tdlzv);
        ISC_LIST_INIT(node->lists);
        ISC_LIST_INIT(node->buffers);
        ISC_LINK_INIT(node, link);



Home | Main Index | Thread Index | Old Index