summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2011-09-27 12:04:29 +0000
committerAnders Broman <anders.broman@ericsson.com>2011-09-27 12:04:29 +0000
commit00e46951ad2d2a4e4f6f703f4e2150478f7df53d (patch)
treebdf8ef520c67daad4e1da2d82d71b90601fc0851 /epan
parentc33cad6b43556b0ec1d0523ccd5e8ba0c4cfb34f (diff)
downloadwireshark-00e46951ad2d2a4e4f6f703f4e2150478f7df53d.tar.gz
In proto_tree_add_bits... use const guint encoding to be consistent with proto_tree_add_item().
svn path=/trunk/; revision=39163
Diffstat (limited to 'epan')
-rw-r--r--epan/proto.c16
-rw-r--r--epan/proto.h4
2 files changed, 10 insertions, 10 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 0a0b92f758..e83859d8bf 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -7212,13 +7212,13 @@ proto_tree_add_bitmask_text(proto_tree *parent_tree, tvbuff_t *tvb,
proto_item *
proto_tree_add_bits_item(proto_tree *tree, const int hf_index, tvbuff_t *tvb,
const gint bit_offset, const gint no_of_bits,
- const gboolean little_endian)
+ const guint encoding)
{
header_field_info *hfinfo;
TRY_TO_FAKE_THIS_ITEM(tree, hf_index, hfinfo);
- return proto_tree_add_bits_ret_val(tree, hf_index, tvb, bit_offset, no_of_bits, NULL, little_endian);
+ return proto_tree_add_bits_ret_val(tree, hf_index, tvb, bit_offset, no_of_bits, NULL, encoding);
}
/*
@@ -7230,7 +7230,7 @@ proto_tree_add_bits_item(proto_tree *tree, const int hf_index, tvbuff_t *tvb,
static proto_item *
_proto_tree_add_bits_ret_val(proto_tree *tree, const int hf_index, tvbuff_t *tvb,
const gint bit_offset, const gint no_of_bits,
- guint64 *return_value, const gboolean little_endian)
+ guint64 *return_value, const guint encoding)
{
gint offset;
guint length;
@@ -7267,11 +7267,11 @@ _proto_tree_add_bits_ret_val(proto_tree *tree, const int hf_index, tvbuff_t *tvb
if (no_of_bits < 9){
value = tvb_get_bits8(tvb, bit_offset, no_of_bits);
}else if(no_of_bits < 17){
- value = tvb_get_bits16(tvb, bit_offset, no_of_bits, little_endian);
+ value = tvb_get_bits16(tvb, bit_offset, no_of_bits, encoding);
}else if(no_of_bits < 33){
- value = tvb_get_bits32(tvb, bit_offset, no_of_bits, little_endian);
+ value = tvb_get_bits32(tvb, bit_offset, no_of_bits, encoding);
}else if(no_of_bits < 65){
- value = tvb_get_bits64(tvb, bit_offset, no_of_bits, little_endian);
+ value = tvb_get_bits64(tvb, bit_offset, no_of_bits, encoding);
}else{
DISSECTOR_ASSERT_NOT_REACHED();
return NULL;
@@ -7352,11 +7352,11 @@ _proto_tree_add_bits_ret_val(proto_tree *tree, const int hf_index, tvbuff_t *tvb
proto_item *
proto_tree_add_bits_ret_val(proto_tree *tree, const int hf_index, tvbuff_t *tvb,
const gint bit_offset, const gint no_of_bits,
- guint64 *return_value, const gboolean little_endian)
+ guint64 *return_value, const guint encoding)
{
proto_item *item;
- if ((item = _proto_tree_add_bits_ret_val(tree, hf_index, tvb, bit_offset, no_of_bits, return_value, little_endian))) {
+ if ((item = _proto_tree_add_bits_ret_val(tree, hf_index, tvb, bit_offset, no_of_bits, return_value, encoding))) {
FI_SET_FLAG(PNODE_FINFO(item), FI_BITS_OFFSET(bit_offset));
FI_SET_FLAG(PNODE_FINFO(item), FI_BITS_SIZE(no_of_bits));
}
diff --git a/epan/proto.h b/epan/proto.h
index 98ef9c522f..799c770bd2 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -1842,7 +1842,7 @@ proto_tree_add_bitmask_text(proto_tree *tree, tvbuff_t *tvb, const guint offset,
@param little_endian big or little endian byte representation
@return the newly created item */
extern proto_item *
-proto_tree_add_bits_item(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const gint bit_offset, const gint no_of_bits, const gboolean little_endian);
+proto_tree_add_bits_item(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const gint bit_offset, const gint no_of_bits, const guint encoding);
/** Add bits to a proto_tree, using the text label registered to that item.
The item is extracted from the tvbuff handed to it.
@@ -1855,7 +1855,7 @@ proto_tree_add_bits_item(proto_tree *tree, const int hf_index, tvbuff_t *tvb, co
@param little_endian big or little endian byte representation
@return the newly created item */
extern proto_item *
-proto_tree_add_bits_ret_val(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const gint bit_offset, const gint no_of_bits, guint64 *return_value, const gboolean little_endian);
+proto_tree_add_bits_ret_val(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const gint bit_offset, const gint no_of_bits, guint64 *return_value, const guint encoding);
/** Add bits for a FT_UINT8, FT_UINT16, FT_UINT24 or FT_UINT32
header field to a proto_tree, with the format generating the