aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wassp.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2020-04-24 14:21:51 +0200
committerAnders Broman <a.broman58@gmail.com>2020-04-25 04:39:46 +0000
commit9750d00ff10bc344a2b1dcc69ee34d09a7ce76d0 (patch)
tree2b2f8d7b3df8bf93a722dd553c58489e7ba5a25c /epan/dissectors/packet-wassp.c
parentc9295f161c4a6275faa98a77a3a81380e01b34d8 (diff)
Introduce tfs_get_string helper
true_false_strings have no helper function to properly retrieve the string representing the true or false value, much like unit_strings, even though this is not uncommon in dissectors. This change introduces the helper function and modifies the dissectors, so that they use this helper i.s.o. their own expressions. Change-Id: I477ed2d90a9a529fc5dcfef7e3ea42ec180d27ae Reviewed-on: https://code.wireshark.org/review/36920 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-wassp.c')
-rw-r--r--epan/dissectors/packet-wassp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/epan/dissectors/packet-wassp.c b/epan/dissectors/packet-wassp.c
index f6611f3cb5..8788507d59 100644
--- a/epan/dissectors/packet-wassp.c
+++ b/epan/dissectors/packet-wassp.c
@@ -5201,9 +5201,7 @@ int dissect_wassp_tlv(proto_tree *wassp_tree, tvbuff_t *tvb, packet_info *pinfo,
case EID_RU_STATE: // 11
proto_tree_add_item(tlv_tree, hf_wassp_tlv_eid_rustate, tvb, offset + TLV_VALUE, length - 4, ENC_BIG_ENDIAN);
proto_item_append_text(tlvi, ": %s",
- (tvb_get_guint8(tvb, offset + TLV_VALUE) ?
- wassp_eid_rustate_types.true_string :
- wassp_eid_rustate_types.false_string));
+ tfs_get_string(tvb_get_guint8(tvb, offset + TLV_VALUE), &wassp_eid_rustate_types));
offset += length;
break;