Try to fix more Clang scan-build warnings.

svn path=/trunk/; revision=36005
This commit is contained in:
Gerald Combs 2011-02-18 21:44:06 +00:00
parent e1afac1b89
commit aaeca955a5
4 changed files with 8 additions and 7 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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))

View File

@ -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;