diff options
author | AndersBroman <anders.broman@ericsson.com> | 2015-06-29 16:01:43 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-06-29 14:05:24 +0000 |
commit | 23ad9b3b484bdae30d10829867951bb2111a2e7c (patch) | |
tree | b2748a3e75b54d7a719dc9ff85266c29e25597cb | |
parent | 60ef92b9a5a03cd34ceb0997f97294e047b7f7f7 (diff) |
[FIP] Use value_string_ext for fip_desc_types.
Change-Id: Ifb4ad35b2a9454366d58cc4bfc81f96630122565
Reviewed-on: https://code.wireshark.org/review/9216
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/dissectors/packet-fip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-fip.c b/epan/dissectors/packet-fip.c index d6e98e1425..1a2fa2a9bd 100644 --- a/epan/dissectors/packet-fip.c +++ b/epan/dissectors/packet-fip.c @@ -179,6 +179,7 @@ static const value_string fip_desc_types[] = { { FIP_DT_FC4F, "FC-4 features" }, { 0, NULL } }; +value_string_ext fip_desc_types_ext = VALUE_STRING_EXT_INIT(fip_desc_types); /* * flags in header fip_flags. @@ -280,7 +281,7 @@ fip_desc_type_len(proto_tree *tree, tvbuff_t *tvb, guint8 dtype, int ett, proto_ proto_tree* ret_tree; ret_tree = proto_tree_add_subtree_format(tree, tvb, 0, -1, ett, item, - "Descriptor: %s ", val_to_str(dtype, fip_desc_types, "Unknown 0x%x")); + "Descriptor: %s ", val_to_str_ext_const(dtype, &fip_desc_types_ext, "Unknown 0x%x")); proto_tree_add_item(ret_tree, hf_fip_desc_type, tvb, 0, 1, ENC_BIG_ENDIAN); proto_tree_add_item(ret_tree, hf_fip_desc_len, tvb, 1, 1, ENC_BIG_ENDIAN); @@ -645,7 +646,7 @@ proto_register_fip(void) { &hf_fip_desc_type, { "Descriptor Type", "fip.desc_type", - FT_UINT8, BASE_HEX, VALS(fip_desc_types), 0, + FT_UINT8, BASE_HEX | BASE_EXT_STRING, &fip_desc_types_ext, 0, NULL, HFILL}}, { &hf_fip_desc_len, |