aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ansi_637.c
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2005-09-02 09:28:30 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2005-09-02 09:28:30 +0000
commit652a37cd069fb41c007b36da263a6f9c8380ba37 (patch)
treea969544e4f697f7fece69fa97b86b6becc0d34ef /epan/dissectors/packet-ansi_637.c
parent0b7153892ece0f80857f0cddd6ed72ac09125d9b (diff)
another switch that should be a value_string
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15669 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-ansi_637.c')
-rw-r--r--epan/dissectors/packet-ansi_637.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/epan/dissectors/packet-ansi_637.c b/epan/dissectors/packet-ansi_637.c
index a3249f85c8..172e5749df 100644
--- a/epan/dissectors/packet-ansi_637.c
+++ b/epan/dissectors/packet-ansi_637.c
@@ -550,6 +550,14 @@ tele_param_rel_timestamp(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 off
}
}
+static const value_string tele_param_pri_ind_strings[] = {
+ { 0, "Normal" },
+ { 1, "Interactive" },
+ { 2, "Urgent" },
+ { 3, "Emergency" },
+ { 0, NULL }
+};
+
static void
tele_param_pri_ind(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset)
{
@@ -560,13 +568,7 @@ tele_param_pri_ind(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset)
oct = tvb_get_guint8(tvb, offset);
- switch ((oct & 0xc0) >> 6)
- {
- case 0: str = "Normal"; break;
- case 1: str = "Interactive"; break;
- case 2: str = "Urgent"; break;
- case 3: str = "Emergency"; break;
- }
+ str=val_to_str((oct&0xc0)>>6, tele_param_pri_ind_strings, "Unknown");
other_decode_bitfield_value(ansi_637_bigbuf, oct, 0xc0, 8);
proto_tree_add_text(tree, tvb, offset, 1,