warning fix: guint16 is always <= 0xFFFF
[obnox/wireshark/wip.git] / epan / addr_and_mask.c
index 3dd2941034f57b82149030c7de6d204b87a6b52b..d7932900471d4d5c3d7c61c7e7366e18c190e94d 100644 (file)
@@ -4,8 +4,8 @@
  *
  * $Id$
  *
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
  * Copyright 1998 Gerald Combs
  *
  * This program is free software; you can redistribute it and/or
@@ -64,10 +64,10 @@ ipv6_addr_and_mask(tvbuff_t *tvb, int offset, struct e_in6_addr *addr,
                return -1;
 
        addr_len = (prefix_len + 7) / 8;
-       memset(addr->u6_addr.u6_addr8, 0, 16);
-       tvb_memcpy(tvb, addr->u6_addr.u6_addr8, offset, addr_len);
+       memset(addr->bytes, 0, 16);
+       tvb_memcpy(tvb, addr->bytes, offset, addr_len);
        if (prefix_len % 8) {
-               addr->u6_addr.u6_addr8[addr_len - 1] &=
+               addr->bytes[addr_len - 1] &=
                    ((0xff00 >> (prefix_len % 8)) & 0xff);
        }