diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-12-02 23:43:30 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-12-02 23:43:30 +0000 |
commit | 59932f27227c4769be94fb46936d123d1770c1a2 (patch) | |
tree | dd1b62868737457d51efa73389ae4975567f4fe3 /packet-fddi.c | |
parent | 8414298f8921489c6174c24d4363c391822e83c5 (diff) | |
download | wireshark-59932f27227c4769be94fb46936d123d1770c1a2.tar.gz wireshark-59932f27227c4769be94fb46936d123d1770c1a2.tar.bz2 wireshark-59932f27227c4769be94fb46936d123d1770c1a2.zip |
Don't cast away constness, and fix variable and structure member
qualifiers as necessary to ensure that we don't have to.
"strcmp()", "strcasecmp()", and "memcmp()" don't return booleans; don't
test their results as if they did.
Use "guint8", not "guchar", for a pointer to (one or more) 8-bit bytes.
Update Michael Tuexen's e-mail address.
svn path=/trunk/; revision=6726
Diffstat (limited to 'packet-fddi.c')
-rw-r--r-- | packet-fddi.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packet-fddi.c b/packet-fddi.c index 87b4e51786..7c173d3b84 100644 --- a/packet-fddi.c +++ b/packet-fddi.c @@ -3,7 +3,7 @@ * * Laurent Deniel <deniel@worldnet.fr> * - * $Id: packet-fddi.c,v 1.58 2002/08/28 21:00:13 jmayer Exp $ + * $Id: packet-fddi.c,v 1.59 2002/12/02 23:43:26 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -125,7 +125,7 @@ static dissector_handle_t llc_handle; static dissector_handle_t data_handle; static void -swap_mac_addr(guchar *swapped_addr, const guchar *orig_addr) +swap_mac_addr(guint8 *swapped_addr, const guint8 *orig_addr) { int i; @@ -300,10 +300,10 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* Extract the destination address, possibly bit-swapping it. */ if (bitswapped) - swap_mac_addr(dst, (guchar *) tvb_get_ptr(tvb, FDDI_P_DHOST, 6)); + swap_mac_addr(dst, tvb_get_ptr(tvb, FDDI_P_DHOST, 6)); else - memcpy(dst, (guchar *) tvb_get_ptr(tvb, FDDI_P_DHOST, 6), sizeof dst); - swap_mac_addr(dst_swapped, (guchar*) tvb_get_ptr(tvb, FDDI_P_DHOST, 6)); + memcpy(dst, tvb_get_ptr(tvb, FDDI_P_DHOST, 6), sizeof dst); + swap_mac_addr(dst_swapped, tvb_get_ptr(tvb, FDDI_P_DHOST, 6)); /* XXX - copy them to some buffer associated with "pi", rather than just making "dst" static? */ @@ -321,10 +321,10 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* Extract the source address, possibly bit-swapping it. */ if (bitswapped) - swap_mac_addr(src, (guchar *) tvb_get_ptr(tvb, FDDI_P_SHOST, 6)); + swap_mac_addr(src, tvb_get_ptr(tvb, FDDI_P_SHOST, 6)); else - memcpy(src, (guchar *) tvb_get_ptr(tvb, FDDI_P_SHOST, 6), sizeof src); - swap_mac_addr(src_swapped, (guchar*) tvb_get_ptr(tvb, FDDI_P_SHOST, 6)); + memcpy(src, tvb_get_ptr(tvb, FDDI_P_SHOST, 6), sizeof src); + swap_mac_addr(src_swapped, tvb_get_ptr(tvb, FDDI_P_SHOST, 6)); /* XXX - copy them to some buffer associated with "pi", rather than just making "src" static? */ |