diff options
author | Gerald Combs <gerald@wireshark.org> | 2011-02-18 21:44:06 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2011-02-18 21:44:06 +0000 |
commit | aaeca955a50d70ff393d847e44e4142991a1324e (patch) | |
tree | bc3969aedebd762702d87e984a37e1215b52ac10 | |
parent | e1afac1b897cb142c0ed519e8699b8b0b10e425a (diff) |
Try to fix more Clang scan-build warnings.
svn path=/trunk/; revision=36005
-rw-r--r-- | epan/dissectors/packet-rlc-lte.c | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-sua.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-x11.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-nwk.c | 4 |
4 files changed, 8 insertions, 7 deletions
diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c index d1c28739a0..e8ad4142cc 100644 --- a/epan/dissectors/packet-rlc-lte.c +++ b/epan/dissectors/packet-rlc-lte.c @@ -1166,6 +1166,7 @@ static void checkChannelRepeatedNACKInfo(packet_info *pinfo, channel_key.channelType = p_rlc_lte_info->channelType; channel_key.channelId = p_rlc_lte_info->channelId; channel_key.direction = p_rlc_lte_info->direction; + memset(repeatedNACKs, 0, sizeof(repeatedNACKs)); /* Do the table lookup */ p_channel_status = (rlc_channel_repeated_nack_status*)g_hash_table_lookup(rlc_lte_repeated_nack_channel_hash, &channel_key); diff --git a/epan/dissectors/packet-sua.c b/epan/dissectors/packet-sua.c index 05eb5b9bac..bf201d3eed 100644 --- a/epan/dissectors/packet-sua.c +++ b/epan/dissectors/packet-sua.c @@ -2145,15 +2145,15 @@ dissect_sua_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *sua_t case MESSAGE_TYPE_COAK: break; default: - if( (assoc->called_ssn != INVALID_SSN)&& (dest_ssn != INVALID_SSN)){ + if( (assoc && assoc->called_ssn != INVALID_SSN)&& (dest_ssn != INVALID_SSN)){ dest_ssn = assoc->called_ssn; } - if( (assoc->calling_ssn != INVALID_SSN)&& (source_ssn != INVALID_SSN)){ + if( (assoc && assoc->calling_ssn != INVALID_SSN)&& (source_ssn != INVALID_SSN)){ source_ssn = assoc->calling_ssn; } } - if (assoc->assoc_id !=0){ + if (assoc && assoc->assoc_id !=0){ assoc_item = proto_tree_add_uint(tree, hf_sua_assoc_id, message_tvb, 0, 0, assoc->assoc_id); PROTO_ITEM_SET_GENERATED(assoc_item); assoc_tree = proto_item_add_subtree(assoc_item, ett_sua_assoc); diff --git a/epan/dissectors/packet-x11.c b/epan/dissectors/packet-x11.c index 1cebaa420d..a05dc2a814 100644 --- a/epan/dissectors/packet-x11.c +++ b/epan/dissectors/packet-x11.c @@ -1841,7 +1841,7 @@ keycode2keysymString(int *keycodemap[256], int first_keycode, keysym = syms[0]; } else if (!(bitmask & LockMask) || !lockmod_is_capslock) { - int lsym, usym; + int lsym, usym = 0; if (keysyms_per_keycode == 1 || (keysyms_per_keycode > 1 && (usym = syms[1]) == NoSymbol)) @@ -1849,7 +1849,7 @@ keycode2keysymString(int *keycodemap[256], int first_keycode, keysym = usym; } else { - int lsym, usym; + int lsym, usym = 0; if (keysyms_per_keycode == 1 || (keysyms_per_keycode > 1 && syms[1] == NoSymbol)) diff --git a/epan/dissectors/packet-zbee-nwk.c b/epan/dissectors/packet-zbee-nwk.c index 4506641f6c..a380d8b754 100644 --- a/epan/dissectors/packet-zbee-nwk.c +++ b/epan/dissectors/packet-zbee-nwk.c @@ -551,7 +551,7 @@ dissect_zbee_nwk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } offset += 8; - if (!pinfo->fd->flags.visited) { + if (!pinfo->fd->flags.visited && nwk_hints) { /* Provide hints to upper layers */ nwk_hints->src_pan = ieee_packet->src_pan; @@ -564,7 +564,7 @@ dissect_zbee_nwk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { /* See if extended source info was previously sniffed */ - if (!pinfo->fd->flags.visited) { + if (!pinfo->fd->flags.visited && nwk_hints) { nwk_hints->src_pan = ieee_packet->src_pan; addr16.addr = packet.src; |