summaryrefslogtreecommitdiff
path: root/asn1/cmip/packet-cmip-template.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-08-03 23:51:13 +0000
committerGerald Combs <gerald@wireshark.org>2009-08-03 23:51:13 +0000
commit87c095780a9fc7377a47c5e7ff8befef942ef0ed (patch)
tree1deac7e9bfdf2d2d01e953e553cedabc6e1e32a6 /asn1/cmip/packet-cmip-template.c
parent9bc8469d967681d399bf9b5b03c20197a91ea813 (diff)
downloadwireshark-87c095780a9fc7377a47c5e7ff8befef942ef0ed.tar.gz
Rework an assignment to keep static analyzers from complaining.
svn path=/trunk/; revision=29287
Diffstat (limited to 'asn1/cmip/packet-cmip-template.c')
-rw-r--r--asn1/cmip/packet-cmip-template.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/asn1/cmip/packet-cmip-template.c b/asn1/cmip/packet-cmip-template.c
index fd40225e63..977c1c5819 100644
--- a/asn1/cmip/packet-cmip-template.c
+++ b/asn1/cmip/packet-cmip-template.c
@@ -98,23 +98,23 @@ static const char *objectclass_identifier_id;
static void
dissect_cmip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
{
- static struct SESSION_DATA_STRUCTURE* session = NULL;
+ static struct SESSION_DATA_STRUCTURE* session;
proto_item *item = NULL;
proto_tree *tree = NULL;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
+ session = (struct SESSION_DATA_STRUCTURE*)pinfo->private_data;
/* do we have spdu type from the session dissector? */
- if( !pinfo->private_data ){
+ if( !session ){
if(tree){
proto_tree_add_text(tree, tvb, 0, -1,
"Internal error:can't get spdu type from session dissector.");
return;
}
} else {
- session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
- if(session->spdu_type == 0 ){
+ if(session->spdu_type == 0 ) {
if(tree){
proto_tree_add_text(tree, tvb, 0, -1,
"Internal error:wrong spdu type %x from session dissector.",session->spdu_type);