diff options
Diffstat (limited to 'epan/dissectors/asn1/cms/packet-cms-template.c')
-rw-r--r-- | epan/dissectors/asn1/cms/packet-cms-template.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/epan/dissectors/asn1/cms/packet-cms-template.c b/epan/dissectors/asn1/cms/packet-cms-template.c index aca1ecb0..c1380f57 100644 --- a/epan/dissectors/asn1/cms/packet-cms-template.c +++ b/epan/dissectors/asn1/cms/packet-cms-template.c @@ -18,6 +18,7 @@ #include <epan/asn1.h> #include <epan/proto_data.h> #include <wsutil/wsgcrypt.h> +#include <wsutil/array.h> #include "packet-ber.h" #include "packet-cms.h" @@ -35,15 +36,15 @@ void proto_register_cms(void); void proto_reg_handoff_cms(void); /* Initialize the protocol and registered fields */ -static int proto_cms = -1; -static int hf_cms_ci_contentType = -1; +static int proto_cms; +static int hf_cms_ci_contentType; #include "packet-cms-hf.c" /* Initialize the subtree pointers */ -static gint ett_cms = -1; +static int ett_cms; #include "packet-cms-ett.c" -static dissector_handle_t cms_handle = NULL; +static dissector_handle_t cms_handle; static int dissect_cms_OCTET_STRING(bool implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) ; /* XXX kill a compiler warning until asn2wrs stops generating these silly wrappers */ @@ -52,8 +53,8 @@ struct cms_private_data { tvbuff_t *content_tvb; }; -static proto_tree *top_tree=NULL; -static proto_tree *cap_tree=NULL; +static proto_tree *top_tree; +static proto_tree *cap_tree; #define HASH_SHA1 "1.3.14.3.2.26" @@ -78,7 +79,7 @@ dissect_cms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da proto_item *item=NULL; proto_tree *tree=NULL; asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); if(parent_tree){ item = proto_tree_add_item(parent_tree, proto_cms, tvb, 0, -1, ENC_NA); @@ -88,7 +89,7 @@ dissect_cms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da col_clear(pinfo->cinfo, COL_INFO); while (tvb_reported_length_remaining(tvb, offset) > 0){ - offset=dissect_cms_ContentInfo(FALSE, tvb, offset, &asn1_ctx , tree, -1); + offset=dissect_cms_ContentInfo(false, tvb, offset, &asn1_ctx , tree, -1); } return tvb_captured_length(tvb); } @@ -155,7 +156,7 @@ void proto_register_cms(void) { }; /* List of subtrees */ - static gint *ett[] = { + static int *ett[] = { &ett_cms, #include "packet-cms-ettarr.c" }; |