diff options
author | Bill Meier <wmeier@newsguy.com> | 2012-12-03 18:11:30 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2012-12-03 18:11:30 +0000 |
commit | f5ecb42c8e5d4260299b66c13ab7c05e596b81df (patch) | |
tree | 3f62855ed005f0c58d3bb5fd9d8b3c1df6d05f77 /epan/dissectors/packet-gsm_abis_om2000.c | |
parent | 3c0d6b82609635ce23a8dfbbd873b02b8b658300 (diff) |
Remove duplicated code added as part of SVN #44777;
Move the SVN #44777 new (unduplicated) code to the correct place.
Also: fixes [-Wshadow] warning.
svn path=/trunk/; revision=46348
Diffstat (limited to 'epan/dissectors/packet-gsm_abis_om2000.c')
-rw-r--r-- | epan/dissectors/packet-gsm_abis_om2000.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/epan/dissectors/packet-gsm_abis_om2000.c b/epan/dissectors/packet-gsm_abis_om2000.c index 0c9058b985..756b2efc47 100644 --- a/epan/dissectors/packet-gsm_abis_om2000.c +++ b/epan/dissectors/packet-gsm_abis_om2000.c @@ -950,37 +950,25 @@ dissect_om2k_mo(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree { guint8 class = tvb_get_guint8(tvb, offset); guint8 inst = tvb_get_guint8(tvb, offset+3); - guint8 sub1 = tvb_get_guint8(tvb, offset+1); - guint8 sub2 = tvb_get_guint8(tvb, offset+2); - proto_item *ti; - proto_tree *mo_tree; - ti = proto_tree_add_item(tree, hf_om2k_mo_if, tvb, offset, - 4, ENC_NA); - mo_tree = proto_item_add_subtree(ti, ett_om2k_mo); - proto_tree_add_item(mo_tree, hf_om2k_mo_class, tvb, offset, - 1, ENC_BIG_ENDIAN); - proto_tree_add_item(mo_tree, hf_om2k_mo_sub1, tvb, offset+1, - 1, ENC_BIG_ENDIAN); - proto_tree_add_item(mo_tree, hf_om2k_mo_sub2, tvb, offset+2, - 1, ENC_BIG_ENDIAN); - proto_tree_add_item(mo_tree, hf_om2k_mo_instance, tvb, offset+3, - 1, ENC_BIG_ENDIAN); - proto_item_append_text(ti, ", Class: %s, Sub: %02x/%02x, Instance: %u", - val_to_str(class, om2k_mo_class_vals, "0x%02x"), - sub1, sub2, inst); col_append_fstr(pinfo->cinfo, COL_INFO, ", (%-4s %u)", val_to_str(class, om2k_mo_class_short_vals, "0x%02x"), inst); if (tree) { proto_item *ti; proto_tree *mo_tree; + guint8 sub1 = tvb_get_guint8(tvb, offset+1); + guint8 sub2 = tvb_get_guint8(tvb, offset+2); ti = proto_tree_add_item(tree, hf_om2k_mo_if, tvb, offset, 4, ENC_NA); mo_tree = proto_item_add_subtree(ti, ett_om2k_mo); proto_tree_add_item(mo_tree, hf_om2k_mo_class, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(mo_tree, hf_om2k_mo_sub1, tvb, offset+1, + 1, ENC_BIG_ENDIAN); + proto_tree_add_item(mo_tree, hf_om2k_mo_sub2, tvb, offset+2, + 1, ENC_BIG_ENDIAN); proto_tree_add_item(mo_tree, hf_om2k_mo_instance, tvb, offset+3, 1, ENC_BIG_ENDIAN); proto_item_append_text(ti, ", Class: %s, Instance: %u", |