aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/spnego
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-12-01 00:18:41 -0500
committerAnders Broman <a.broman58@gmail.com>2014-12-01 12:18:44 +0000
commite77507b0eac903e74389ef1bf2dfa51d4cf00aad (patch)
treed9a99ae5315842fd1d3cc957c8adac50a779e5ed /asn1/spnego
parent542439e64aef746512a5a8d3835e49805087c706 (diff)
Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.
Part 3 of many, but this concludes the strict conversion to proto_tree_add_bitmask. Patches to follow with use proto_tree_add_bitmask_xxx (some functions still need to be written) Change-Id: Ic2435667c6a7f1d40602124e5044954d2a296180 Reviewed-on: https://code.wireshark.org/review/5553 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'asn1/spnego')
-rw-r--r--asn1/spnego/packet-spnego-template.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/asn1/spnego/packet-spnego-template.c b/asn1/spnego/packet-spnego-template.c
index bdd0fdc365..e8d2217e54 100644
--- a/asn1/spnego/packet-spnego-template.c
+++ b/asn1/spnego/packet-spnego-template.c
@@ -945,26 +945,16 @@ dissect_spnego_krb5_getmic_base(tvbuff_t *tvb, int offset, packet_info *pinfo _U
static int
dissect_spnego_krb5_cfx_flags(tvbuff_t *tvb, int offset,
proto_tree *spnego_krb5_tree,
- guint8 cfx_flags)
+ guint8 cfx_flags _U_)
{
- proto_tree *cfx_flags_tree;
- proto_item *tf;
-
- tf = proto_tree_add_uint(spnego_krb5_tree,
- hf_spnego_krb5_cfx_flags,
- tvb, offset, 1, cfx_flags);
- cfx_flags_tree = proto_item_add_subtree(tf, ett_spnego_krb5_cfx_flags);
-
- proto_tree_add_boolean(cfx_flags_tree,
- hf_spnego_krb5_cfx_flags_04,
- tvb, offset, 1, cfx_flags);
- proto_tree_add_boolean(cfx_flags_tree,
- hf_spnego_krb5_cfx_flags_02,
- tvb, offset, 1, cfx_flags);
- proto_tree_add_boolean(cfx_flags_tree,
- hf_spnego_krb5_cfx_flags_01,
- tvb, offset, 1, cfx_flags);
+ static const int * flags[] = {
+ &hf_spnego_krb5_cfx_flags_04,
+ &hf_spnego_krb5_cfx_flags_02,
+ &hf_spnego_krb5_cfx_flags_01,
+ NULL
+ };
+ proto_tree_add_bitmask(spnego_krb5_tree, tvb, offset, hf_spnego_krb5_cfx_flags, ett_spnego_krb5_cfx_flags, flags, ENC_NA);
return (offset + 1);
}