diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-11-29 19:21:20 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-11-29 19:21:20 +0000 |
commit | d99fdfda639e78feffa3d9a1a6c758ae90539442 (patch) | |
tree | 87b591d02048464feebc32f8cf1dc784c7229b17 /epan/dissectors/packet-null.c | |
parent | 5ac6474c945133a8415fb3be917859e5d42b6256 (diff) |
Replace macros: BSWAP16, BSWAP32, BSWAP64 with glib-version.
XXX, people are not aware that expression of this macros might be evaluated multiple times, like:
- BSWAP16(tvb_get_letohs(tvb, off)) : \
+ GUINT16_SWAP_LE_BE(tvb_get_letohs(tvb, off)) : \
Should be tvb_get_ntohs() called?
svn path=/trunk/; revision=53653
Diffstat (limited to 'epan/dissectors/packet-null.c')
-rw-r--r-- | epan/dissectors/packet-null.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/epan/dissectors/packet-null.c b/epan/dissectors/packet-null.c index cbcf193b2a..1ba8c4695c 100644 --- a/epan/dissectors/packet-null.c +++ b/epan/dissectors/packet-null.c @@ -29,8 +29,6 @@ #include <glib.h> #include <string.h> -#include <wsutil/pint.h> - #include <epan/packet.h> #include "packet-null.h" #include <epan/atalk-utils.h> @@ -294,7 +292,7 @@ capture_null( const guchar *pd, int len, packet_counts *ld ) null_header >>= 16; } else { /* Byte-swap it. */ - null_header = BSWAP32(null_header); + null_header = GUINT32_SWAP_LE_BE(null_header); } } else { /* @@ -308,7 +306,7 @@ capture_null( const guchar *pd, int len, packet_counts *ld ) * type; that's in the lower 16 bits of "null_header", but * is byte-swapped. */ - null_header = BSWAP16(null_header & 0xFFFF); + null_header = GUINT16_SWAP_LE_BE(null_header & 0xFFFF); } } @@ -394,7 +392,7 @@ dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) null_header >>= 16; } else { /* Byte-swap it. */ - null_header = BSWAP32(null_header); + null_header = GUINT32_SWAP_LE_BE(null_header); } } else { /* @@ -408,7 +406,7 @@ dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * type; that's in the lower 16 bits of "null_header", but * is byte-swapped. */ - null_header = BSWAP16(null_header & 0xFFFF); + null_header = GUINT16_SWAP_LE_BE(null_header & 0xFFFF); } } |