aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bmc.c
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2013-11-16 22:31:07 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2013-11-16 22:31:07 +0000
commit004220fb63d9c49f5ba389a7d80d0bbde14ba11f (patch)
tree21410e677f84ba94ab90afc1dab7c4866c9596cc /epan/dissectors/packet-bmc.c
parent0e029166ba5f894893c06fba315e1a7340eef156 (diff)
Exporting/importing variables cause problems, so create function to do bitswaping.
svn path=/trunk/; revision=53374
Diffstat (limited to 'epan/dissectors/packet-bmc.c')
-rw-r--r--epan/dissectors/packet-bmc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/epan/dissectors/packet-bmc.c b/epan/dissectors/packet-bmc.c
index b70e2381ae..38217a64db 100644
--- a/epan/dissectors/packet-bmc.c
+++ b/epan/dissectors/packet-bmc.c
@@ -88,7 +88,7 @@ static int
dissect_bmc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
guint8 message_type;
- guint8 *p_rev, *reversing_buffer;
+ guint8 *reversing_buffer;
gint offset = 0;
gint i, len;
proto_item *ti;
@@ -104,10 +104,7 @@ dissect_bmc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
/* Needs bit-reversing. Create a new buffer, copy the message to it and bit-reverse */
len = tvb_length(tvb);
reversing_buffer = (guint8 *)tvb_memdup(NULL, tvb, offset, len);
- p_rev = reversing_buffer;
- /* Entire message is bit reversed */
- for (i=0; i<len; i++, p_rev++)
- *p_rev = BIT_SWAP(*p_rev);
+ bit_swap_buf_inplace(reversing_buffer, len);
/* Make this new buffer part of the display and provide a way to dispose of it */
bit_reversed_tvb = tvb_new_child_real_data(tvb, reversing_buffer, len, len);