Add BMT_NO_FLAGS for proto_tree_add_bitmask_XXX_with_flags.
This prevents some false positives for fix-encoding_args.pl which doesn't like constant values (like 0) passed as the last argument to any proto_tree_add_xxx call. Change-Id: Iab7b09b425bf0d48126533daa0e65490bd7b8890 Reviewed-on: https://code.wireshark.org/review/12167 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
a9f5d8503f
commit
be7bd77d99
|
@ -715,10 +715,10 @@ dissect_cmnsvc (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 flag
|
|||
|
||||
if ((opcode == FC_ELS_PLOGI) || (opcode == FC_ELS_PDISC)) {
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_cmnfeatures,
|
||||
ett_fcels_cmnfeatures, pflags, flags, 0);
|
||||
ett_fcels_cmnfeatures, pflags, flags, BMT_NO_FLAGS);
|
||||
} else {
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_cmnfeatures,
|
||||
ett_fcels_cmnfeatures, common_flags, flags, 0);
|
||||
ett_fcels_cmnfeatures, common_flags, flags, BMT_NO_FLAGS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -752,10 +752,10 @@ dissect_clssvc_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint1
|
|||
|
||||
if ((opcode == FC_ELS_FLOGI) || (opcode == FC_ELS_FDISC)) {
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_clsflags,
|
||||
ett_fcels_clsflags, pflags, flags, 0);
|
||||
ett_fcels_clsflags, pflags, flags, BMT_NO_FLAGS);
|
||||
} else {
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_clsflags,
|
||||
ett_fcels_clsflags, common_flags, flags, 0);
|
||||
ett_fcels_clsflags, common_flags, flags, BMT_NO_FLAGS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4503,7 +4503,7 @@ dissect_iphc_crtp_fh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
|
|||
|
||||
proto_tree_add_bitmask_with_flags(fh_tree, tvb, 2, hf_iphc_crtp_fh_flags,
|
||||
ett_iphc_crtp_fh_flags, iphc_crtp_fh_flags_fields, ENC_BIG_ENDIAN,
|
||||
0);
|
||||
BMT_NO_FLAGS);
|
||||
proto_tree_add_item(fh_tree, hf_iphc_crtp_gen, tvb, 2, 1,
|
||||
ENC_BIG_ENDIAN);
|
||||
|
||||
|
@ -4787,7 +4787,7 @@ dissect_iphc_crtp_cntcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
|
|||
}
|
||||
proto_tree_add_bitmask_with_flags(cntcp_tree, tvb, 1, hf_iphc_crtp_fh_flags,
|
||||
ett_iphc_crtp_fh_flags, iphc_crtp_fh_flags_fields, ENC_BIG_ENDIAN,
|
||||
0);
|
||||
BMT_NO_FLAGS);
|
||||
proto_tree_add_item(cntcp_tree, hf_iphc_crtp_gen, tvb, 1, 1,
|
||||
ENC_BIG_ENDIAN);
|
||||
|
||||
|
|
|
@ -2488,6 +2488,7 @@ proto_tree_add_bitmask_text(proto_tree *tree, tvbuff_t *tvb, const guint offset,
|
|||
const char *name, const char *fallback,
|
||||
const gint ett, const int **fields, const guint encoding, const int flags);
|
||||
|
||||
#define BMT_NO_FLAGS 0x00 /**< Don't use any flags */
|
||||
#define BMT_NO_APPEND 0x01 /**< Don't change the title at all */
|
||||
#define BMT_NO_INT 0x02 /**< Don't add integral (non-boolean) fields to title */
|
||||
#define BMT_NO_FALSE 0x04 /**< Don't add booleans unless they're TRUE */
|
||||
|
|
Loading…
Reference in New Issue