aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_a_dtap.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-10-05 16:36:31 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-10-05 16:36:31 +0000
commitbe0f4aa44bfb6d7af027babdf4ddcd083dfda917 (patch)
tree5fdfadb5dbf697b7317e5fa9d43e9d15ae9dedd5 /epan/dissectors/packet-gsm_a_dtap.c
parent0488967f29deb15cee07c70954810a3c70a90995 (diff)
Moved the block for second octet to avoid a warning about an uninitialized
variable. svn path=/trunk/; revision=30332
Diffstat (limited to 'epan/dissectors/packet-gsm_a_dtap.c')
-rw-r--r--epan/dissectors/packet-gsm_a_dtap.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c
index 311c2547cd..d2b00b7786 100644
--- a/epan/dissectors/packet-gsm_a_dtap.c
+++ b/epan/dissectors/packet-gsm_a_dtap.c
@@ -3300,23 +3300,24 @@ de_sup_codec_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
proto_tree_add_item(subtree, hf_gsm_a_codec_gsm_hr, tvb, curr_offset, 1, FALSE);
proto_tree_add_item(subtree, hf_gsm_a_codec_gsm_fr, tvb, curr_offset, 1, FALSE);
length--;
- }
- if (length > 0)
- {
- /*
- * We can proceed with the second octet of the bitmap
- */
- curr_offset++;
- proto_tree_add_bits_item(subtree, hf_gsm_a_dtap_spare_bits, tvb, curr_offset << 3, 2, FALSE);
- proto_tree_add_item(subtree, hf_gsm_a_codec_ohr_amr_wb, tvb, curr_offset, 1, FALSE);
- proto_tree_add_item(subtree, hf_gsm_a_codec_ofr_amr_wb, tvb, curr_offset, 1, FALSE);
- proto_tree_add_item(subtree, hf_gsm_a_codec_ohr_amr, tvb, curr_offset, 1, FALSE);
- proto_tree_add_item(subtree, hf_gsm_a_codec_umts_amr_wb, tvb, curr_offset, 1, FALSE);
- proto_tree_add_item(subtree, hf_gsm_a_codec_fr_amr_wb, tvb, curr_offset, 1, FALSE);
- proto_tree_add_item(subtree, hf_gsm_a_codec_pdc_efr, tvb, curr_offset, 1, FALSE);
- length--;
- }
+ if (length > 0)
+ {
+ /*
+ * We can proceed with the second octet of the bitmap
+ */
+ curr_offset++;
+ proto_tree_add_bits_item(subtree, hf_gsm_a_dtap_spare_bits, tvb, curr_offset << 3, 2, FALSE);
+ proto_tree_add_item(subtree, hf_gsm_a_codec_ohr_amr_wb, tvb, curr_offset, 1, FALSE);
+ proto_tree_add_item(subtree, hf_gsm_a_codec_ofr_amr_wb, tvb, curr_offset, 1, FALSE);
+ proto_tree_add_item(subtree, hf_gsm_a_codec_ohr_amr, tvb, curr_offset, 1, FALSE);
+ proto_tree_add_item(subtree, hf_gsm_a_codec_umts_amr_wb, tvb, curr_offset, 1, FALSE);
+ proto_tree_add_item(subtree, hf_gsm_a_codec_fr_amr_wb, tvb, curr_offset, 1, FALSE);
+ proto_tree_add_item(subtree, hf_gsm_a_codec_pdc_efr, tvb, curr_offset, 1, FALSE);
+ length--;
+ }
+ }
+
curr_offset = curr_offset + length;
}