diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-08-03 23:51:13 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-08-03 23:51:13 +0000 |
commit | 7cf647169194591cffd2d06b6f018f607793f901 (patch) | |
tree | 1deac7e9bfdf2d2d01e953e553cedabc6e1e32a6 /asn1/cmip/packet-cmip-template.c | |
parent | 5b02786a9e1757359fd262810b3b0f4ea8a6e68e (diff) |
Rework an assignment to keep static analyzers from complaining.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29287 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'asn1/cmip/packet-cmip-template.c')
-rw-r--r-- | asn1/cmip/packet-cmip-template.c | 8 |
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); |