aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_abis_tfp.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2016-09-27 23:57:29 +0200
committerAnders Broman <a.broman58@gmail.com>2016-09-28 06:07:01 +0000
commit152e245804397bfcd0fc3e4cfac22e1d49b0b169 (patch)
tree3ed21c5c6178a39c59409ddaa7859c2d59de5163 /epan/dissectors/packet-gsm_abis_tfp.c
parentf8b32e5b4edac7c4ca9932aacef64b48e514b577 (diff)
proto_tree_add_item_ret_(u)int/proto_tree_add_bitmask_with_flags_ret_uint64: return real value
Apply mask and bit shift on the returned value. Change-Id: I00aebc854756f01a25199a259d6d5252abea4349 Reviewed-on: https://code.wireshark.org/review/17958 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-gsm_abis_tfp.c')
-rw-r--r--epan/dissectors/packet-gsm_abis_tfp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/epan/dissectors/packet-gsm_abis_tfp.c b/epan/dissectors/packet-gsm_abis_tfp.c
index 29e7895f28..1a6587d1c3 100644
--- a/epan/dissectors/packet-gsm_abis_tfp.c
+++ b/epan/dissectors/packet-gsm_abis_tfp.c
@@ -96,7 +96,7 @@ dissect_abis_tfp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
proto_item *ti;
proto_tree *tfp_tree;
int offset = 0;
- guint32 slot_rate, frame_bits, hdr2, atsr, seq_nr;
+ guint32 slot_rate, frame_bits, atsr, seq_nr;
guint8 ftype;
tvbuff_t *next_tvb;
@@ -105,12 +105,9 @@ dissect_abis_tfp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
ti = proto_tree_add_item(tree, proto_abis_tfp, tvb, 0, -1, ENC_NA);
tfp_tree = proto_item_add_subtree(ti, ett_tfp);
- proto_tree_add_item_ret_uint(tfp_tree, hf_tfp_hdr_atsr, tvb, offset, 2, ENC_BIG_ENDIAN, &hdr2);
- proto_tree_add_item(tfp_tree, hf_tfp_hdr_slot_rate, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(tfp_tree, hf_tfp_hdr_seq_nr, tvb, offset, 2, ENC_BIG_ENDIAN);
- atsr = hdr2 >> 13;
- slot_rate = (hdr2 >> 11) & 3;
- seq_nr = (hdr2 >> 6) & 0x1f;
+ proto_tree_add_item_ret_uint(tfp_tree, hf_tfp_hdr_atsr, tvb, offset, 2, ENC_BIG_ENDIAN, &atsr);
+ proto_tree_add_item_ret_uint(tfp_tree, hf_tfp_hdr_slot_rate, tvb, offset, 2, ENC_BIG_ENDIAN, &slot_rate);
+ proto_tree_add_item_ret_uint(tfp_tree, hf_tfp_hdr_seq_nr, tvb, offset, 2, ENC_BIG_ENDIAN, &seq_nr);
proto_tree_add_item(tfp_tree, hf_tfp_hdr_delay_info, tvb, offset+1, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tfp_tree, hf_tfp_hdr_p, tvb, offset+1, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tfp_tree, hf_tfp_hdr_s, tvb, offset+2, 1, ENC_NA);