Remove tfs_true_false
Instead of passing a pointer to a tfs struct, just use NULL or the provided macro.
This commit is contained in:
parent
78547a149f
commit
0ba19bd641
|
@ -1117,7 +1117,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
|
|||
}
|
||||
ms_client_nap_capable = tvb_get_guint8(tvb, offset);
|
||||
proto_item_append_text(oi, ", %s (%d)",
|
||||
tfs_get_string(ms_client_nap_capable, &tfs_true_false),
|
||||
tfs_get_true_false(ms_client_nap_capable),
|
||||
ms_client_nap_capable);
|
||||
proto_tree_add_item(option_tree, hf_dhcpfo_ms_client_nap_capable, tvb, offset, option_length, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
|
|
|
@ -2043,7 +2043,7 @@ dissect_low_trailer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint o
|
|||
* and "OUT", but rather can continue to use typical boolean values. "IN"
|
||||
* and "OUT" are provided as convenience. */
|
||||
proto_tree_add_boolean_format_value(tree, hf_ingress, tvb, o, 1, ingress, "%s (%s)",
|
||||
tfs_get_string(ingress, &tfs_true_false),
|
||||
tfs_get_true_false(ingress),
|
||||
tfs_get_string(ingress, &f5tfs_ing));
|
||||
o++;
|
||||
|
||||
|
@ -2446,7 +2446,7 @@ dissect_dpt_trailer_noise_low(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
|
|||
* and "OUT", but rather can continue to use typical boolean values. "IN"
|
||||
* and "OUT" are provided as convenience. */
|
||||
pi = proto_tree_add_boolean_format_value(tree, hf_ingress, tvb, offset, 1, ingress,
|
||||
"%s (%s)", tfs_get_string(ingress, &tfs_true_false),
|
||||
"%s (%s)", tfs_get_true_false(ingress),
|
||||
tfs_get_string(ingress, &f5tfs_ing));
|
||||
if (ver > 2) {
|
||||
/* The old ingress field is now a flag field. Leave the old ingress field
|
||||
|
|
|
@ -1727,7 +1727,7 @@ static int dissect_oran_c_section(tvbuff_t *tvb, proto_tree *tree, packet_info *
|
|||
/* Summary */
|
||||
proto_item_set_len(set_ti, (bit_offset+7)/8 - set_start_offset);
|
||||
proto_item_append_text(set_ti, " (mcScaleReMask=%u csf=%s mcScaleOffset=%u)",
|
||||
(guint)mcScaleReMask, tfs_get_string((gboolean)csf, &tfs_true_false), (guint)mcScaleOffset);
|
||||
(guint)mcScaleReMask, tfs_get_true_false((gboolean)csf), (guint)mcScaleOffset);
|
||||
}
|
||||
|
||||
proto_item_append_text(extension_ti, " (%u sets)", sets);
|
||||
|
|
|
@ -29,7 +29,6 @@ const char *tfs_get_string(gboolean value, const true_false_string *tfs)
|
|||
* A default set of true/false strings that dissectors can use for
|
||||
* FT_BOOLEAN header fields.
|
||||
*/
|
||||
const true_false_string tfs_true_false = { "True", "False" };
|
||||
const true_false_string tfs_yes_no = { "Yes", "No" };
|
||||
const true_false_string tfs_no_yes = { "No", "Yes" };
|
||||
const true_false_string tfs_set_notset = { "Set", "Not set" };
|
||||
|
|
|
@ -38,11 +38,12 @@ typedef struct true_false_string {
|
|||
*/
|
||||
WS_DLL_PUBLIC const char *tfs_get_string(gboolean value, const true_false_string *tfs);
|
||||
|
||||
#define tfs_get_true_false(value) tfs_get_string(value, NULL)
|
||||
|
||||
/*
|
||||
* A default set of true/false strings that dissectors can use for
|
||||
* FT_BOOLEAN header fields. By default tfs_true_false is used.
|
||||
* FT_BOOLEAN header fields. By default { "True", "False" } is used.
|
||||
*/
|
||||
WS_DLL_PUBLIC const true_false_string tfs_true_false;
|
||||
WS_DLL_PUBLIC const true_false_string tfs_yes_no;
|
||||
WS_DLL_PUBLIC const true_false_string tfs_no_yes;
|
||||
WS_DLL_PUBLIC const true_false_string tfs_set_notset;
|
||||
|
|
|
@ -1779,7 +1779,6 @@ libwireshark.so.0 libwireshark0 #MINVER#
|
|||
tfs_shared_independent@Base 1.9.1
|
||||
tfs_success_fail@Base 1.9.1
|
||||
tfs_supported_not_supported@Base 1.9.1
|
||||
tfs_true_false@Base 1.9.1
|
||||
tfs_up_down@Base 2.5.0
|
||||
tfs_uplink_downlink@Base 2.5.0
|
||||
tfs_used_notused@Base 1.9.1
|
||||
|
|
Loading…
Reference in New Issue