aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cmip.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 /epan/dissectors/packet-cmip.c
parent9bc8469d967681d399bf9b5b03c20197a91ea813 (diff)
Rework an assignment to keep static analyzers from complaining.
svn path=/trunk/; revision=29287
Diffstat (limited to 'epan/dissectors/packet-cmip.c')
-rw-r--r--epan/dissectors/packet-cmip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-cmip.c b/epan/dissectors/packet-cmip.c
index fca1b4dfa1..1c2e21a861 100644
--- a/epan/dissectors/packet-cmip.c
+++ b/epan/dissectors/packet-cmip.c
@@ -4394,23 +4394,23 @@ static void dissect_WeekMask_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, prot
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);