aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2013-11-16 22:44:29 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2013-11-16 22:44:29 +0000
commitbc8d5a1e61c0bb7cf1abbcfa8676ea81a66e0106 (patch)
treec08caf1227d637ec217c3932b7306413cb365e4b
parent004220fb63d9c49f5ba389a7d80d0bbde14ba11f (diff)
Fix previous commit + rename to bitswap.
svn path=/trunk/; revision=53375
-rw-r--r--epan/dissectors/packet-bmc.c4
-rw-r--r--epan/dissectors/packet-fddi.c2
-rw-r--r--epan/dissectors/packet-h223.c5
-rw-r--r--wsutil/bitswap.c2
-rw-r--r--wsutil/bitswap.h2
5 files changed, 7 insertions, 8 deletions
diff --git a/epan/dissectors/packet-bmc.c b/epan/dissectors/packet-bmc.c
index 38217a64db..a2d1b17cd8 100644
--- a/epan/dissectors/packet-bmc.c
+++ b/epan/dissectors/packet-bmc.c
@@ -90,7 +90,7 @@ dissect_bmc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
guint8 message_type;
guint8 *reversing_buffer;
gint offset = 0;
- gint i, len;
+ gint len;
proto_item *ti;
proto_tree *bmc_tree;
tvbuff_t *bit_reversed_tvb;
@@ -104,7 +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);
- bit_swap_buf_inplace(reversing_buffer, len);
+ bitswap_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);
diff --git a/epan/dissectors/packet-fddi.c b/epan/dissectors/packet-fddi.c
index 78671225f7..d1e8954c07 100644
--- a/epan/dissectors/packet-fddi.c
+++ b/epan/dissectors/packet-fddi.c
@@ -138,7 +138,7 @@ static void
swap_mac_addr(guint8 *swapped_addr, tvbuff_t *tvb, gint offset)
{
tvb_memcpy(tvb, swapped_addr, offset, 6);
- bit_swap_buf_inplace(swapped_addr, 6);
+ bitswap_buf_inplace(swapped_addr, 6);
}
diff --git a/epan/dissectors/packet-h223.c b/epan/dissectors/packet-h223.c
index 0463013763..970b1af90e 100644
--- a/epan/dissectors/packet-h223.c
+++ b/epan/dissectors/packet-h223.c
@@ -1367,11 +1367,10 @@ dissect_h223_bitswapped (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvbuff_t *reversed_tvb;
guint8 *datax;
guint len;
- guint i;
len = tvb_length(tvb);
- datax = tvb_memdup(pinfo->pool, tvb, 0, len);
- bit_swap_buf_inplace(datax, len);
+ datax = (guint8 *) tvb_memdup(pinfo->pool, tvb, 0, len);
+ bitswap_buf_inplace(datax, len);
/*
* Add the reversed tvbuff to the list of tvbuffs to which
diff --git a/wsutil/bitswap.c b/wsutil/bitswap.c
index ec387c5c8b..7106a3420a 100644
--- a/wsutil/bitswap.c
+++ b/wsutil/bitswap.c
@@ -66,7 +66,7 @@ static const guint8 swaptab[256] =
0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
};
-void bit_swap_buf_inplace(guint8 *buf, size_t len)
+void bitswap_buf_inplace(guint8 *buf, size_t len)
{
size_t i;
diff --git a/wsutil/bitswap.h b/wsutil/bitswap.h
index ad50ab5192..b91f029478 100644
--- a/wsutil/bitswap.h
+++ b/wsutil/bitswap.h
@@ -31,7 +31,7 @@
extern "C" {
#endif /* __cplusplus */
-WS_DLL_PUBLIC void bit_swap_buf_inplace(guint8 *buf, size_t len);
+WS_DLL_PUBLIC void bitswap_buf_inplace(guint8 *buf, size_t len);
#ifdef __cplusplus
}