In proto_tree_add_bits... use const guint encoding to be consistent with proto_tree_add_item().

svn path=/trunk/; revision=39163
This commit is contained in:
Anders Broman 2011-09-27 12:04:29 +00:00
parent c33cad6b43
commit 00e46951ad
2 changed files with 10 additions and 10 deletions

View File

@ -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));
}

View File

@ -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