diff options
-rw-r--r-- | epan/dissectors/packet-ncp-sss.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-ndps.c | 42 | ||||
-rw-r--r-- | epan/dissectors/packet-netflow.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-nfs.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-nsip.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-ntlmssp.c | 18 | ||||
-rw-r--r-- | epan/dissectors/packet-olsr.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-ospf.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-packetbb.c | 18 | ||||
-rw-r--r-- | epan/dissectors/packet-per.c | 66 | ||||
-rw-r--r-- | epan/dissectors/packet-pgm.c | 36 | ||||
-rw-r--r-- | epan/dissectors/packet-pop.c | 20 | ||||
-rw-r--r-- | epan/dissectors/packet-portmap.c | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-ptp.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-pw-common.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-pw-hdlc.c | 12 |
16 files changed, 141 insertions, 141 deletions
diff --git a/epan/dissectors/packet-ncp-sss.c b/epan/dissectors/packet-ncp-sss.c index 6d9249f498..68438bb69d 100644 --- a/epan/dissectors/packet-ncp-sss.c +++ b/epan/dissectors/packet-ncp-sss.c @@ -35,7 +35,7 @@ #include "packet-ncp-int.h" #include "packet-ncp-sss.h" -static guint32 subverb=0; +static guint32 gbl_subverb=0; static gint ett_sss = -1; @@ -601,21 +601,21 @@ dissect_sss_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ncp_tree, ncp proto_tree_add_item(ncp_tree, hf_length, tvb, foffset, 4, TRUE); foffset += 4; foffset += 12; /* Blank Context */ - subverb = tvb_get_letohl(tvb, foffset); + gbl_subverb = tvb_get_letohl(tvb, foffset); if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", val_to_str(subverb, sss_verb_enum, "Unknown (%d)")); + col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", val_to_str(gbl_subverb, sss_verb_enum, "Unknown (%d)")); } aitem = proto_tree_add_item(ncp_tree, hf_verb, tvb, foffset, 4, TRUE); atree = proto_item_add_subtree(aitem, ett_sss); if (request_value) { - request_value->req_nds_flags=subverb; + request_value->req_nds_flags=gbl_subverb; } foffset += 4; process_flags(atree, tvb, foffset); foffset += 4; proto_tree_add_item(atree, hf_context, tvb, foffset, 4, FALSE); foffset += 4; - switch (subverb) { + switch (gbl_subverb) { case 0: foffset += 4; foffset = sss_string(tvb, hf_user, atree, foffset, TRUE, 0); diff --git a/epan/dissectors/packet-ndps.c b/epan/dissectors/packet-ndps.c index 4c009b862a..0c113d9186 100644 --- a/epan/dissectors/packet-ndps.c +++ b/epan/dissectors/packet-ndps.c @@ -2324,13 +2324,13 @@ objectidentification(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset) static int print_address(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset) { - guint32 address_type=0; - guint32 address_len=0; + guint32 addr_type=0; + guint32 addr_len=0; - address_type = tvb_get_ntohl(tvb, foffset); - proto_tree_add_uint(ndps_tree, hf_ndps_address, tvb, foffset, 4, address_type); + addr_type = tvb_get_ntohl(tvb, foffset); + proto_tree_add_uint(ndps_tree, hf_ndps_address, tvb, foffset, 4, addr_type); foffset += 4; - address_len = tvb_get_ntohl(tvb, foffset); + addr_len = tvb_get_ntohl(tvb, foffset); proto_tree_add_item(ndps_tree, hf_address_len, tvb, foffset, 4, FALSE); foffset += 4; /* @@ -2340,7 +2340,7 @@ print_address(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset) * XXX - should this code - and the code in packet-ncp2222.inc to * dissect addresses - check the length for the types it supports? */ - switch(address_type) + switch(addr_type) { case 0x00000000: proto_tree_add_item(ndps_tree, hf_ndps_net, tvb, foffset, 4, FALSE); @@ -2354,20 +2354,20 @@ print_address(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset) default: break; } - tvb_ensure_bytes_exist(tvb, foffset, address_len); - foffset += address_len; - return foffset+(address_len%4); + tvb_ensure_bytes_exist(tvb, foffset, addr_len); + foffset += addr_len; + return foffset+(addr_len%4); } static int address_item(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset) { - guint32 address_type=0; + guint32 addr_type=0; - address_type = tvb_get_ntohl(tvb, foffset); - proto_tree_add_uint(ndps_tree, hf_address_type, tvb, foffset, 4, address_type); + addr_type = tvb_get_ntohl(tvb, foffset); + proto_tree_add_uint(ndps_tree, hf_address_type, tvb, foffset, 4, addr_type); foffset += 4; - switch(address_type) + switch(addr_type) { case 0: case 1: @@ -4332,12 +4332,12 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint len=0; tvbuff_t *next_tvb = NULL; fragment_data *fd_head; - spx_info *spx_info; + spx_info *spx_info_p; ndps_req_hash_value *request_value = NULL; conversation_t *conversation; /* Get SPX info from SPX dissector */ - spx_info = pinfo->private_data; + spx_info_p = pinfo->private_data; /* Check to see if defragmentation is enabled in the dissector */ if (!ndps_defragment) { dissect_ndps(tvb, pinfo, tree); @@ -4380,7 +4380,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) return; } /* Check to see of this is a fragment. If so then mark as a fragment. */ - if (!spx_info->eom) { + if (!spx_info_p->eom) { request_value->ndps_frag = TRUE; } /* Now we process the fragments */ @@ -4393,11 +4393,11 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) len = tvb_reported_length(tvb); if (tvb_length(tvb) >= len) { - fd_head = fragment_add_seq_next(tvb, 0, pinfo, tid, ndps_fragment_table, ndps_reassembled_table, len, !spx_info->eom); + fd_head = fragment_add_seq_next(tvb, 0, pinfo, tid, ndps_fragment_table, ndps_reassembled_table, len, !spx_info_p->eom); if (fd_head != NULL) { /* Is this the last fragment? EOM will indicate */ - if (fd_head->next != NULL && spx_info->eom) + if (fd_head->next != NULL && spx_info_p->eom) { proto_item *frag_tree_item; @@ -4425,7 +4425,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) next_tvb = tvb_new_subset_remaining(tvb, 0); if (check_col(pinfo->cinfo, COL_INFO)) { - if (!spx_info->eom) + if (!spx_info_p->eom) { col_append_str(pinfo->cinfo, COL_INFO, "[NDPS Fragment]"); } @@ -4437,7 +4437,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Fragment from first pass of dissection */ if (check_col(pinfo->cinfo, COL_INFO)) { - if (!spx_info->eom) + if (!spx_info_p->eom) { col_append_str(pinfo->cinfo, COL_INFO, "[NDPS Fragment]"); } @@ -4461,7 +4461,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) else { /* This is the end fragment so dissect and mark end */ - if (spx_info->eom) { + if (spx_info_p->eom) { request_value->ndps_frag = FALSE; dissect_ndps(next_tvb, pinfo, tree); } diff --git a/epan/dissectors/packet-netflow.c b/epan/dissectors/packet-netflow.c index 6044db24c7..9abb069b05 100644 --- a/epan/dissectors/packet-netflow.c +++ b/epan/dissectors/packet-netflow.c @@ -3961,11 +3961,11 @@ dissect_pdu(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * pdutree, int o } static const gchar * -getprefix(const guint32 * address, int prefix) +getprefix(const guint32 * addr, int prefix) { guint32 gprefix; - gprefix = *address & g_htonl((0xffffffff << (32 - prefix))); + gprefix = *addr & g_htonl((0xffffffff << (32 - prefix))); return (ip_to_str((const guint8 *)&gprefix)); } diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c index 24e3d188ba..8cd9e02783 100644 --- a/epan/dissectors/packet-nfs.c +++ b/epan/dissectors/packet-nfs.c @@ -2354,15 +2354,15 @@ static int dissect_ftype(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name) { guint32 ftype; - const char* ftype_name = NULL; + const char* ftype_name_p = NULL; ftype = tvb_get_ntohl(tvb, offset+0); if (tree) { - ftype_name = val_to_str(ftype, nfs2_ftype, "%u"); + ftype_name_p = val_to_str(ftype, nfs2_ftype, "%u"); proto_tree_add_text(tree, tvb, offset, 4, - "%s: %s (%u)", name, ftype_name, ftype); + "%s: %s (%u)", name, ftype_name_p, ftype); } offset += 4; diff --git a/epan/dissectors/packet-nsip.c b/epan/dissectors/packet-nsip.c index 8b9f2b8291..51210205af 100644 --- a/epan/dissectors/packet-nsip.c +++ b/epan/dissectors/packet-nsip.c @@ -518,14 +518,14 @@ decode_iei_reset_flag(nsip_ie_t *ie, build_info_t *bi, int ie_start_offset) { static void decode_iei_ip_address(nsip_ie_t *ie, build_info_t *bi, int ie_start_offset) { - guint8 address_type; + guint8 addr_type; guint32 ip4_addr; struct e_in6_addr ip6_addr; - address_type = tvb_get_guint8(bi->tvb, bi->offset); + addr_type = tvb_get_guint8(bi->tvb, bi->offset); proto_tree_add_item(bi->nsip_tree, hf_nsip_ip_address_type, bi->tvb, bi->offset, 1, FALSE); - switch (address_type) { + switch (addr_type) { case NSIP_IP_ADDRESS_TYPE_IPV4: ie->total_length = 2 + ipv4_element.address_length; ip4_addr = tvb_get_ipv4(bi->tvb, bi->offset+1); diff --git a/epan/dissectors/packet-ntlmssp.c b/epan/dissectors/packet-ntlmssp.c index ae059da531..d80ad2e286 100644 --- a/epan/dissectors/packet-ntlmssp.c +++ b/epan/dissectors/packet-ntlmssp.c @@ -84,7 +84,7 @@ typedef struct _md4_pass { guint8 md4[NTLMSSP_KEY_LEN]; } md4_pass; -static unsigned char zeros[24] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; +static unsigned char gbl_zeros[24] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; static GHashTable* hash_packet = NULL; /* @@ -247,7 +247,7 @@ static gint ett_ntlmssp_ntlmv2_response = -1; static gint ett_ntlmssp_ntlmv2_response_name = -1; /* Configuration variables */ -static const char *nt_password = NULL; +static const char *gbl_nt_password = NULL; #define MAX_BLOB_SIZE 256 typedef struct _ntlmssp_blob { @@ -471,7 +471,7 @@ get_md4pass_list(md4_pass** p_pass_list,const char* nt_password) *p_pass_list = ep_alloc(nb_pass*sizeof(md4_pass)); pass_list=*p_pass_list; - if( memcmp(nt_password_hash,zeros,NTLMSSP_KEY_LEN) != 0 ) { + if( memcmp(nt_password_hash,gbl_zeros,NTLMSSP_KEY_LEN) != 0 ) { memcpy(pass_list[i].md4,nt_password_hash,NTLMSSP_KEY_LEN); i = 1; } @@ -1465,8 +1465,8 @@ dissect_ntlmssp_challenge (tvbuff_t *tvb, packet_info *pinfo, int offset, if (!(conv_ntlmssp_info->flags & NTLMSSP_NEGOTIATE_EXTENDED_SECURITY)) { conv_ntlmssp_info->rc4_state_initialized = 0; - create_ntlmssp_v1_key(nt_password, conv_ntlmssp_info->server_challenge,NULL, sspkey,NULL,conv_ntlmssp_info->flags,conv_ntlmssp_info->ntlm_response.contents,conv_ntlmssp_info->lm_response.contents); - if( memcmp(sspkey,zeros,NTLMSSP_KEY_LEN) != 0 ) { + create_ntlmssp_v1_key(gbl_nt_password, conv_ntlmssp_info->server_challenge,NULL, sspkey,NULL,conv_ntlmssp_info->flags,conv_ntlmssp_info->ntlm_response.contents,conv_ntlmssp_info->lm_response.contents); + if( memcmp(sspkey,gbl_zeros,NTLMSSP_KEY_LEN) != 0 ) { get_sealing_rc4key(sspkey,conv_ntlmssp_info->flags,&ssp_key_len,clientkey,serverkey); crypt_rc4_init(&conv_ntlmssp_info->rc4_state_client, sspkey, ssp_key_len); crypt_rc4_init(&conv_ntlmssp_info->rc4_state_server, sspkey, ssp_key_len); @@ -1680,15 +1680,15 @@ dissect_ntlmssp_auth (tvbuff_t *tvb, packet_info *pinfo, int offset, { conv_ntlmssp_info->rc4_state_initialized = 0; if( conv_ntlmssp_info->is_auth_ntlm_v2 ) { - create_ntlmssp_v2_key(nt_password, conv_ntlmssp_info->server_challenge,conv_ntlmssp_info->client_challenge, sspkey,encryptedsessionkey,conv_ntlmssp_info->flags,conv_ntlmssp_info->ntlm_response,conv_ntlmssp_info->lm_response,ntlmssph); + create_ntlmssp_v2_key(gbl_nt_password, conv_ntlmssp_info->server_challenge,conv_ntlmssp_info->client_challenge, sspkey,encryptedsessionkey,conv_ntlmssp_info->flags,conv_ntlmssp_info->ntlm_response,conv_ntlmssp_info->lm_response,ntlmssph); } else { memcpy(conv_ntlmssp_info->client_challenge,conv_ntlmssp_info->lm_response.contents,8); - create_ntlmssp_v1_key(nt_password, conv_ntlmssp_info->server_challenge,conv_ntlmssp_info->client_challenge, sspkey,encryptedsessionkey,conv_ntlmssp_info->flags,conv_ntlmssp_info->ntlm_response.contents,conv_ntlmssp_info->lm_response.contents); + create_ntlmssp_v1_key(gbl_nt_password, conv_ntlmssp_info->server_challenge,conv_ntlmssp_info->client_challenge, sspkey,encryptedsessionkey,conv_ntlmssp_info->flags,conv_ntlmssp_info->ntlm_response.contents,conv_ntlmssp_info->lm_response.contents); } /* ssp is the exported session key */ - if( memcmp(sspkey,zeros,NTLMSSP_KEY_LEN) != 0) { + if( memcmp(sspkey,gbl_zeros,NTLMSSP_KEY_LEN) != 0) { get_sealing_rc4key(sspkey,conv_ntlmssp_info->flags,&ssp_key_len,clientkey,serverkey); get_siging_key((guint8*)&conv_ntlmssp_info->sign_key_server,(guint8*)&conv_ntlmssp_info->sign_key_client,sspkey,ssp_key_len); crypt_rc4_init(&conv_ntlmssp_info->rc4_state_server, serverkey, ssp_key_len); @@ -2702,7 +2702,7 @@ proto_register_ntlmssp(void) prefs_register_string_preference(ntlmssp_module, "nt_password", "NT Password", "NT Password (used to decrypt payloads)", - &nt_password); + &gbl_nt_password); register_dissector("ntlmssp", dissect_ntlmssp, proto_ntlmssp); new_register_dissector("ntlmssp_payload", dissect_ntlmssp_payload, proto_ntlmssp); diff --git a/epan/dissectors/packet-olsr.c b/epan/dissectors/packet-olsr.c index 109d3bf97c..ae5d6ea288 100644 --- a/epan/dissectors/packet-olsr.c +++ b/epan/dissectors/packet-olsr.c @@ -161,11 +161,11 @@ static const value_string nameservice_type_vals[] = { static gboolean global_olsr_olsrorg = TRUE; static gboolean global_olsr_nrlolsr = TRUE; -static double getOlsrTime(guint8 time) { +static double getOlsrTime(guint8 timeval) { int high_bits, low_bits; - high_bits = ((time & 0xF0) >> 4); - low_bits = (time & 0x0F); + high_bits = ((timeval & 0xF0) >> 4); + low_bits = (timeval & 0x0F); return ((1 << low_bits) / 16.0) * (1 + (high_bits / 16.0)); } diff --git a/epan/dissectors/packet-ospf.c b/epan/dissectors/packet-ospf.c index a4a99323af..a2b5a09043 100644 --- a/epan/dissectors/packet-ospf.c +++ b/epan/dissectors/packet-ospf.c @@ -688,7 +688,7 @@ static gint ospf_ls_type_to_filter (guint8 ls_type) typedef struct _bitfield_info { int hfindex; gint *ett; - int *index; + int *idx; int num; } bitfield_info; @@ -829,7 +829,7 @@ dissect_ospf_bitfield (proto_tree *parent_tree, tvbuff_t *tvb, int offset, gint length, pos; gint i; header_field_info *hfinfo; - int hfindex, index; + int hfindex, idx; gint returned_length; hfindex = hf_ospf_filter[bfinfo->hfindex]; @@ -862,15 +862,15 @@ dissect_ospf_bitfield (proto_tree *parent_tree, tvbuff_t *tvb, int offset, str = ep_alloc(MAX_OPTIONS_LEN); str[0] = 0; for (i = 0, pos = 0; i < bfinfo->num; i++) { - index = hf_ospf_filter[bfinfo->index[i]]; - hfinfo = proto_registrar_get_nth(index); + idx = hf_ospf_filter[bfinfo->idx[i]]; + hfinfo = proto_registrar_get_nth(idx); if (flags & hfinfo->bitmask) { returned_length = g_snprintf(&str[pos], MAX_OPTIONS_LEN-pos, "%s%s", pos ? ", " : "", hfinfo->name); pos += MIN(returned_length, MAX_OPTIONS_LEN-pos); } - proto_tree_add_boolean(tree, index, tvb, offset, length, flags); + proto_tree_add_boolean(tree, idx, tvb, offset, length, flags); } if (str[0]) { proto_item_append_text(item, " (%s)", str); diff --git a/epan/dissectors/packet-packetbb.c b/epan/dissectors/packet-packetbb.c index 9c196c70fc..3db2400d49 100644 --- a/epan/dissectors/packet-packetbb.c +++ b/epan/dissectors/packet-packetbb.c @@ -300,7 +300,7 @@ static int dissect_pbb_tlvblock(tvbuff_t *tvb, proto_tree *tree, guint offset, static int dissect_pbb_addressblock(tvbuff_t *tvb, proto_tree *tree, guint offset, guint maxoffset, guint8 addressType, guint8 addressSize) { - guint8 address[MAX_ADDR_SIZE]; + guint8 addr[MAX_ADDR_SIZE]; guint8 numAddr; guint8 address_flags; @@ -326,7 +326,7 @@ static int dissect_pbb_addressblock(tvbuff_t *tvb, proto_tree *tree, guint offse DISSECTOR_ASSERT(addressSize <= MAX_ADDR_SIZE); - memset(address, 0, addressSize); + memset(addr, 0, addressSize); block_length = 2; block_index = offset; @@ -355,7 +355,7 @@ static int dissect_pbb_addressblock(tvbuff_t *tvb, proto_tree *tree, guint offse tvb_get_ptr(tvb, offset, maxoffset - offset), "Not enough octets for addressblock head"); return tvb_reported_length(tvb); } - tvb_memcpy(tvb, address, offset, head_length); + tvb_memcpy(tvb, addr, offset, head_length); midSize -= head_length; block_length += (head_length+1); @@ -398,7 +398,7 @@ static int dissect_pbb_addressblock(tvbuff_t *tvb, proto_tree *tree, guint offse tvb_get_ptr(tvb, offset, maxoffset - offset), "Not enough octets for addressblock tail"); return tvb_reported_length(tvb); } - tvb_memcpy(tvb, &address[addressSize - tail_length], offset, tail_length); + tvb_memcpy(tvb, &addr[addressSize - tail_length], offset, tail_length); midSize -= tail_length; block_length += (tail_length+1); @@ -456,10 +456,10 @@ static int dissect_pbb_addressblock(tvbuff_t *tvb, proto_tree *tree, guint offse proto_tree_add_item(addr_tree, hf_packetbb_addr_head, tvb, tail_index, 1, FALSE); } for (i=0; i<numAddr; i++) { - guint32 ipv4 = (address[0] << 24) + (address[1] << 16) + (address[2] << 8) + address[3]; + guint32 ipv4 = (addr[0] << 24) + (addr[1] << 16) + (addr[2] << 8) + addr[3]; guint8 prefix = addressSize * 8; - tvb_memcpy(tvb, &address[head_length], mid_index + midSize*i, midSize); + tvb_memcpy(tvb, &addr[head_length], mid_index + midSize*i, midSize); switch (addressType) { case 0: @@ -468,15 +468,15 @@ static int dissect_pbb_addressblock(tvbuff_t *tvb, proto_tree *tree, guint offse break; case 1: addrValue_item = proto_tree_add_ipv6(addr_tree, hf_packetbb_addr_value[addressType], - tvb, mid_index, block_index + block_length - mid_index, address); + tvb, mid_index, block_index + block_length - mid_index, addr); break; case 2: addrValue_item = proto_tree_add_ether(addr_tree, hf_packetbb_addr_value[addressType], - tvb, mid_index, block_index + block_length - mid_index, address); + tvb, mid_index, block_index + block_length - mid_index, addr); break; default: addrValue_item = proto_tree_add_bytes(addr_tree, hf_packetbb_addr_value[addressType], - tvb, mid_index, block_index + block_length - mid_index, address); + tvb, mid_index, block_index + block_length - mid_index, addr); break; } addrValue_tree = proto_item_add_subtree(addrValue_item, ett_packetbb_addr_value); diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c index 426620db90..e3af00f2d0 100644 --- a/epan/dissectors/packet-per.c +++ b/epan/dissectors/packet-per.c @@ -188,14 +188,14 @@ tvbuff_t *new_octet_aligned_subset_bits(tvbuff_t *tvb, guint32 boffset, asn1_ctx guint16 word; guint32 new_length, check_length; - guint32 remainder, tvb_bits; + guint32 remainderval, tvb_bits; /* Calculate the size reqired */ new_length = no_of_bits/8; - remainder = no_of_bits % 8; + remainderval = no_of_bits % 8; - if(remainder){ + if(remainderval){ new_length++; }else{ /* Number of bits = even number of octets */ @@ -205,8 +205,8 @@ tvbuff_t *new_octet_aligned_subset_bits(tvbuff_t *tvb, guint32 boffset, asn1_ctx /* The bits can be contained in two "extra octets" .... .xxx [xxxx]*n xx... ....*/ tvb_bits = (boffset & 7)+ no_of_bits; check_length = tvb_bits/8; - remainder = no_of_bits % 8; - if(remainder){ + remainderval = no_of_bits % 8; + if(remainderval){ check_length++; } @@ -225,10 +225,10 @@ tvbuff_t *new_octet_aligned_subset_bits(tvbuff_t *tvb, guint32 boffset, asn1_ctx /* get the 'odd' bits */ shift1 = offset & 0x07; word = tvb_get_ntohs(tvb, offset) & bit_mask16[offset & 0x07]; - word = word >> (16-(shift1+remainder)); + word = word >> (16-(shift1+remainderval)); buf[0] = word & 0x00ff; - boffset = boffset + remainder; + boffset = boffset + remainderval; offset = boffset >> 3; if (new_length >1){ shift1 = offset & 0x07; @@ -262,7 +262,7 @@ tvbuff_t *new_octet_aligned_subset_bits(tvbuff_t *tvb, guint32 boffset, asn1_ctx }else{ word = tvb_get_guint8(tvb,offset+i) << (shift1 + 8); } - word = word & bit_mask16_unalligned[remainder]; + word = word & bit_mask16_unalligned[remainderval]; word = word >> 8; buf[i] = (guint8) (word & 0x00ff); } @@ -1562,23 +1562,23 @@ DEBUG_ENTRY("dissect_per_constrained_integer_64b"); val_start = (offset>>3)-2; val_length = 2; val+=min; } else { - int i,num_bytes,num_bits; + int i,num_bytes,n_bits; /* 10.5.7.4 */ /* 12.2.6 */ /* calculate the number of bits to hold the length */ if ((range & G_GINT64_CONSTANT(0xffffffff0000000)) != 0){ - num_bits=3; + n_bits=3; }else{ - num_bits=2; + n_bits=2; } - num_bytes =tvb_get_bits8(tvb, offset, num_bits); + num_bytes =tvb_get_bits8(tvb, offset, n_bits); num_bytes++; /* lower bound for length determinant is 1 */ if (display_internal_per_fields){ - int_item = proto_tree_add_bits_item(tree, hf_per_const_int_len, tvb, offset,num_bits, FALSE); + int_item = proto_tree_add_bits_item(tree, hf_per_const_int_len, tvb, offset,n_bits, FALSE); proto_item_append_text(int_item,"+1=%u bytes, Range = (%" G_GINT64_MODIFIER "u)",num_bytes, range); } - offset = offset+num_bits; + offset = offset+n_bits; /* byte aligned */ BYTE_ALIGN_OFFSET(offset); val=0; @@ -1684,7 +1684,7 @@ dissect_per_choice(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree * int extension_root_entries; int extension_addition_entries; guint32 choice_index; - int i, index, cidx; + int i, idx, cidx; guint32 ext_length; guint32 old_offset = offset; proto_item *choice_item = NULL; @@ -1729,10 +1729,10 @@ DEBUG_ENTRY("dissect_per_choice"); if (!display_internal_per_fields) PROTO_ITEM_SET_HIDDEN(actx->created_item); } - index = -1; cidx = choice_index; + idx = -1; cidx = choice_index; for (i=0; choice[i].p_id; i++) { if(choice[i].extension != ASN1_NOT_EXTENSION_ROOT){ - if (!cidx) { index = i; break; } + if (!cidx) { idx = i; break; } cidx--; } } @@ -1740,22 +1740,22 @@ DEBUG_ENTRY("dissect_per_choice"); offset = dissect_per_normally_small_nonnegative_whole_number(tvb, offset, actx, tree, hf_per_choice_extension_index, &choice_index); offset = dissect_per_length_determinant(tvb, offset, actx, tree, hf_per_open_type_length, &ext_length); - index = -1; cidx = choice_index; + idx = -1; cidx = choice_index; for (i=0; choice[i].p_id; i++) { if(choice[i].extension == ASN1_NOT_EXTENSION_ROOT){ - if (!cidx) { index = i; break; } + if (!cidx) { idx = i; break; } cidx--; } } } - if (index != -1) { - choice_item = proto_tree_add_uint(tree, hf_index, tvb, old_offset>>3, 0, choice[index].value); + if (idx != -1) { + choice_item = proto_tree_add_uint(tree, hf_index, tvb, old_offset>>3, 0, choice[idx].value); choice_tree = proto_item_add_subtree(choice_item, ett_index); if (!extension_flag) { - offset = choice[index].func(tvb, offset, actx, choice_tree, *choice[index].p_id); + offset = choice[idx].func(tvb, offset, actx, choice_tree, *choice[idx].p_id); } else { - choice[index].func(tvb, offset, actx, choice_tree, *choice[index].p_id); + choice[idx].func(tvb, offset, actx, choice_tree, *choice[idx].p_id); offset += ext_length * 8; } proto_item_set_len(choice_item, BLEN(old_offset, offset)); @@ -1769,55 +1769,55 @@ DEBUG_ENTRY("dissect_per_choice"); } } - if (value && (index != -1)) - *value = choice[index].value; + if (value && (idx != -1)) + *value = choice[idx].value; return offset; } static const char * -index_get_optional_name(const per_sequence_t *sequence, int index) +index_get_optional_name(const per_sequence_t *sequence, int idx) { int i; header_field_info *hfi; for(i=0;sequence[i].p_id;i++){ if((sequence[i].extension!=ASN1_NOT_EXTENSION_ROOT)&&(sequence[i].optional==ASN1_OPTIONAL)){ - if (index == 0) { + if (idx == 0) { hfi = proto_registrar_get_nth(*sequence[i].p_id); return (hfi) ? hfi->name : "<unknown filed>"; } - index--; + idx--; } } return "<unknown type>"; } static const char * -index_get_extension_name(const per_sequence_t *sequence, int index) +index_get_extension_name(const per_sequence_t *sequence, int idx) { int i; header_field_info *hfi; for(i=0;sequence[i].p_id;i++){ if(sequence[i].extension==ASN1_NOT_EXTENSION_ROOT){ - if (index == 0) { + if (idx == 0) { hfi = proto_registrar_get_nth(*sequence[i].p_id); return (hfi) ? hfi->name : "<unknown filed>"; } - index--; + idx--; } } return "<unknown type>"; } static const char * -index_get_field_name(const per_sequence_t *sequence, int index) +index_get_field_name(const per_sequence_t *sequence, int idx) { header_field_info *hfi; - hfi = proto_registrar_get_nth(*sequence[index].p_id); + hfi = proto_registrar_get_nth(*sequence[idx].p_id); return (hfi) ? hfi->name : "<unknown filed>"; } diff --git a/epan/dissectors/packet-pgm.c b/epan/dissectors/packet-pgm.c index c09dc511c2..fceeb54753 100644 --- a/epan/dissectors/packet-pgm.c +++ b/epan/dissectors/packet-pgm.c @@ -258,7 +258,7 @@ static const char * optsstr(guint8 opts) { char *msg; - gint returned_length, index = 0; + gint returned_length, idx = 0; const int MAX_STR_LEN = 256; if (opts == 0) @@ -266,23 +266,23 @@ optsstr(guint8 opts) msg=ep_alloc(MAX_STR_LEN); if (opts & PGM_OPT){ - returned_length = g_snprintf(&msg[index], MAX_STR_LEN-index, "Present"); - index += MIN(returned_length, MAX_STR_LEN-index); + returned_length = g_snprintf(&msg[idx], MAX_STR_LEN-idx, "Present"); + idx += MIN(returned_length, MAX_STR_LEN-idx); } if (opts & PGM_OPT_NETSIG){ - returned_length = g_snprintf(&msg[index], MAX_STR_LEN-index, "%sNetSig", (!index)?"":","); - index += MIN(returned_length, MAX_STR_LEN-index); + returned_length = g_snprintf(&msg[idx], MAX_STR_LEN-idx, "%sNetSig", (!idx)?"":","); + idx += MIN(returned_length, MAX_STR_LEN-idx); } if (opts & PGM_OPT_VAR_PKTLEN){ - returned_length = g_snprintf(&msg[index], MAX_STR_LEN-index, "%sVarLen", (!index)?"":","); - index += MIN(returned_length, MAX_STR_LEN-index); + returned_length = g_snprintf(&msg[idx], MAX_STR_LEN-idx, "%sVarLen", (!idx)?"":","); + idx += MIN(returned_length, MAX_STR_LEN-idx); } if (opts & PGM_OPT_PARITY){ - returned_length = g_snprintf(&msg[index], MAX_STR_LEN-index, "%sParity", (!index)?"":","); - index += MIN(returned_length, MAX_STR_LEN-index); + returned_length = g_snprintf(&msg[idx], MAX_STR_LEN-idx, "%sParity", (!idx)?"":","); + idx += MIN(returned_length, MAX_STR_LEN-idx); } - if (!index) { - g_snprintf(&msg[index], MAX_STR_LEN-index, "0x%x", opts); + if (!idx) { + g_snprintf(&msg[idx], MAX_STR_LEN-idx, "0x%x", opts); } return(msg); } @@ -290,7 +290,7 @@ static const char * paritystr(guint8 parity) { char *msg; - gint returned_length, index = 0; + gint returned_length, idx = 0; const int MAX_STR_LEN = 256; if (parity == 0) @@ -298,15 +298,15 @@ paritystr(guint8 parity) msg=ep_alloc(MAX_STR_LEN); if (parity & PGM_OPT_PARITY_PRM_PRO){ - returned_length = g_snprintf(&msg[index], MAX_STR_LEN-index, "Pro-active"); - index += MIN(returned_length, MAX_STR_LEN-index); + returned_length = g_snprintf(&msg[idx], MAX_STR_LEN-idx, "Pro-active"); + idx += MIN(returned_length, MAX_STR_LEN-idx); } if (parity & PGM_OPT_PARITY_PRM_OND){ - returned_length = g_snprintf(&msg[index], MAX_STR_LEN-index, "%sOn-demand", (!index)?"":","); - index += MIN(returned_length, MAX_STR_LEN-index); + returned_length = g_snprintf(&msg[idx], MAX_STR_LEN-idx, "%sOn-demand", (!idx)?"":","); + idx += MIN(returned_length, MAX_STR_LEN-idx); } - if (!index) { - g_snprintf(&msg[index], MAX_STR_LEN-index, "0x%x", parity); + if (!idx) { + g_snprintf(&msg[idx], MAX_STR_LEN-idx, "0x%x", parity); } return(msg); } diff --git a/epan/dissectors/packet-pop.c b/epan/dissectors/packet-pop.c index 926e68641c..5fcd6dc85c 100644 --- a/epan/dissectors/packet-pop.c +++ b/epan/dissectors/packet-pop.c @@ -116,7 +116,7 @@ static gboolean response_is_continuation(const guchar *data); static void dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - struct pop_proto_data *frame_data; + struct pop_proto_data *frame_data_p; gboolean is_request; gboolean is_continuation; proto_tree *pop_tree, *reqresp_tree; @@ -153,9 +153,9 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) is_continuation = response_is_continuation(line); } - frame_data = p_get_proto_data(pinfo->fd, proto_pop); + frame_data_p = p_get_proto_data(pinfo->fd, proto_pop); - if (!frame_data) { + if (!frame_data_p) { conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, @@ -208,24 +208,24 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (pop_data_desegment) { - if (!frame_data) { + if (!frame_data_p) { data_val->msg_read_len += tvb_length(tvb); - frame_data = se_alloc(sizeof(struct pop_proto_data)); + frame_data_p = se_alloc(sizeof(struct pop_proto_data)); - frame_data->conversation_id = conversation->index; - frame_data->more_frags = data_val->msg_read_len < data_val->msg_tot_len; + frame_data_p->conversation_id = conversation->index; + frame_data_p->more_frags = data_val->msg_read_len < data_val->msg_tot_len; - p_add_proto_data(pinfo->fd, proto_pop, frame_data); + p_add_proto_data(pinfo->fd, proto_pop, frame_data_p); } frag_msg = fragment_add_seq_next(tvb, 0, pinfo, - frame_data->conversation_id, + frame_data_p->conversation_id, pop_data_segment_table, pop_data_reassembled_table, tvb_length(tvb), - frame_data->more_frags); + frame_data_p->more_frags); next_tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled DATA", diff --git a/epan/dissectors/packet-portmap.c b/epan/dissectors/packet-portmap.c index 21712f21f8..6946e0a4ea 100644 --- a/epan/dissectors/packet-portmap.c +++ b/epan/dissectors/packet-portmap.c @@ -136,7 +136,7 @@ static int dissect_getport_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - guint32 port; + guint32 portx; /* we might have learnt a <ipaddr><protocol><port> mapping for ONC-RPC*/ if(!pinfo->fd->flags.visited){ @@ -156,15 +156,15 @@ dissect_getport_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, } } - port = tvb_get_ntohl(tvb, offset); + portx = tvb_get_ntohl(tvb, offset); offset = dissect_rpc_uint32(tvb, tree, hf_portmap_port, offset); - proto_item_append_text(tree, " GETPORT Reply Port:%d", port); - if(port){ + proto_item_append_text(tree, " GETPORT Reply Port:%d", portx); + if(portx){ if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " Port:%d", port); + col_append_fstr(pinfo->cinfo, COL_INFO, " Port:%d", portx); } - proto_item_append_text(tree, " Port:%d", port); + proto_item_append_text(tree, " Port:%d", portx); } else { col_append_str(pinfo->cinfo, COL_INFO, " PROGRAM_NOT_AVAILABLE"); proto_item_append_text(tree, " PROGRAM_NOT_AVAILABLE"); diff --git a/epan/dissectors/packet-ptp.c b/epan/dissectors/packet-ptp.c index d3982f9ba8..d9dc85413a 100644 --- a/epan/dissectors/packet-ptp.c +++ b/epan/dissectors/packet-ptp.c @@ -2168,7 +2168,7 @@ static void dissect_ptp_v2_timeInterval(tvbuff_t *tvb, guint16 *cur_offset, proto_tree *tree, char* name, int hf_ptp_v2_timeInterval_ns, int hf_ptp_v2_timeInterval_subns) { - double time; + double time_double; gint64 time_ns; guint16 time_subns; proto_item *ptptimeInterval_ti; @@ -2184,16 +2184,16 @@ dissect_ptp_v2_timeInterval(tvbuff_t *tvb, guint16 *cur_offset, proto_tree *tree time_ns = time_ns | G_GINT64_CONSTANT(0xFFFFFFFFFF000000); time_ns = time_ns | tvb_get_ntohs(tvb, *cur_offset+4); - time = ((1.0*time_ns) + (time_subns/65536.0)); + time_double = ((1.0*time_ns) + (time_subns/65536.0)); } else { time_ns = time_ns | tvb_get_ntohs(tvb, *cur_offset+4); - time = time_ns + (time_subns/65536.0); + time_double = time_ns + (time_subns/65536.0); } ptptimeInterval_ti = proto_tree_add_text(tree, tvb, *cur_offset, 8, - "%s: %f nanoseconds", name, time); + "%s: %f nanoseconds", name, time_double); ptptimeInterval_subtree = proto_item_add_subtree(ptptimeInterval_ti, ett_ptp_v2_timeInterval); diff --git a/epan/dissectors/packet-pw-common.c b/epan/dissectors/packet-pw-common.c index 05f65312bb..fd1b109a96 100644 --- a/epan/dissectors/packet-pw-common.c +++ b/epan/dissectors/packet-pw-common.c @@ -102,10 +102,10 @@ void dissect_pw_padding(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) item = proto_tree_add_item(tree, proto_pw_padding, tvb, 0, -1, FALSE); pwc_item_append_text_n_items(item,size,"byte"); { - proto_tree* tree; - tree = proto_item_add_subtree(item, ett); - call_dissector(dh_data, tvb, pinfo, tree); - item = proto_tree_add_int(tree, hf_padding_len, tvb, 0, 0, size); + proto_tree* tree_p; + tree_p = proto_item_add_subtree(item, ett); + call_dissector(dh_data, tvb, pinfo, tree_p); + item = proto_tree_add_int(tree_p, hf_padding_len, tvb, 0, 0, size); PROTO_ITEM_SET_HIDDEN(item); /*allow filtering*/ } } diff --git a/epan/dissectors/packet-pw-hdlc.c b/epan/dissectors/packet-pw-hdlc.c index 117a711bb5..4755de0695 100644 --- a/epan/dissectors/packet-pw-hdlc.c +++ b/epan/dissectors/packet-pw-hdlc.c @@ -84,27 +84,27 @@ static void dissect_pw_hdlc_nocw_hdlc_ppp( tvbuff_t * tvb, packet_info * pinfo, proto_item *item; proto_item *item_address; proto_item *item_control; - guint8 address; + guint8 addr; guint8 control; - address = tvb_get_guint8(tvb, 0); + addr = tvb_get_guint8(tvb, 0); control = tvb_get_guint8(tvb, 1); item = proto_tree_add_item( tree, proto_pw_hdlc_nocw_hdlc_ppp, tvb, 0, 2, FALSE ); tr = proto_item_add_subtree( item, ett_pw_hdlc ); - item_address = proto_tree_add_uint( tr, hf_pw_hdlc_address_field, tvb, 0, 1, address ); + item_address = proto_tree_add_uint( tr, hf_pw_hdlc_address_field, tvb, 0, 1, addr ); item_control = proto_tree_add_uint_format( tr, hf_pw_hdlc_control_field, tvb, 1, 1, control, "Control field: 0x%x", control ); tr = proto_item_add_subtree( item_address, ett_pw_hdlc ); - if ( 0x3F == (( address & 0xFC ) >> 2 )) + if ( 0x3F == (( addr & 0xFC ) >> 2 )) proto_tree_add_uint_format( tr, hf_pw_hdlc_address, tvb, 0, 1, 0xFC, "Address: 0x%x (All stations)", 0x3F ); else - proto_tree_add_uint( tr, hf_pw_hdlc_address, tvb, 0, 1, ( address & 0xFC ) >> 2 ); + proto_tree_add_uint( tr, hf_pw_hdlc_address, tvb, 0, 1, ( addr & 0xFC ) >> 2 ); - proto_tree_add_uint( tr, hf_pw_hdlc_cr_bit, tvb, 0, 1, ( address & 2 ) >> 1 ); + proto_tree_add_uint( tr, hf_pw_hdlc_cr_bit, tvb, 0, 1, ( addr & 2 ) >> 1 ); tr = proto_item_add_subtree( item_control, ett_pw_hdlc ); |