diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-09-03 06:44:54 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-09-03 06:44:54 +0000 |
commit | 8084fb9e82e4996b6ce0def050c1c0f09c315b79 (patch) | |
tree | d55c4969ed13ec7ab57646525e3873a67ad7b1c3 /epan/dissectors/packet-iuup.c | |
parent | bd56b304c6f545a887ddf2dac996b874186a7fa4 (diff) |
guint8, not gchar, is the appropriate type for a byte.
svn path=/trunk/; revision=22776
Diffstat (limited to 'epan/dissectors/packet-iuup.c')
-rw-r--r-- | epan/dissectors/packet-iuup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-iuup.c b/epan/dissectors/packet-iuup.c index 71aecb9cde..dd7becbb2e 100644 --- a/epan/dissectors/packet-iuup.c +++ b/epan/dissectors/packet-iuup.c @@ -325,7 +325,7 @@ static const value_string iuup_fqcs[] = { static proto_item* -iuup_proto_tree_add_bits(proto_tree* tree, int hf, tvbuff_t* tvb, int offset, int bit_offset, guint bits, gchar** buf) { +iuup_proto_tree_add_bits(proto_tree* tree, int hf, tvbuff_t* tvb, int offset, int bit_offset, guint bits, guint8** buf) { static const guint8 masks[] = {0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe}; int len = (bits + bit_offset)/8 + ((bits + bit_offset)%8 ? 0 : 1); guint8* shifted_buffer; @@ -345,7 +345,7 @@ iuup_proto_tree_add_bits(proto_tree* tree, int hf, tvbuff_t* tvb, int offset, in shifted_buffer[len] &= masks[(bits + bit_offset)%8]; if (buf) - *buf = (gchar*)shifted_buffer; + *buf = shifted_buffer; pi = proto_tree_add_bytes(tree, hf, tvb, offset, len + ((bits + bit_offset) % 8 ? 1 : 0) , shifted_buffer); proto_item_append_text(pi, " (%i Bits)", bits); |