diff options
author | Bill Meier <wmeier@newsguy.com> | 2008-06-27 16:15:30 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2008-06-27 16:15:30 +0000 |
commit | f8e3822738c2c6c906c1927ebe88c639c766a725 (patch) | |
tree | 4085507410fd9cdbc670acc4969542f1f47d2fb4 | |
parent | 09868c5db59d18f97a59e41831cbe98eda84b082 (diff) |
Fix some warnings reported by gcc -Wshadow ...
Fix some spacing in packet-dcom.c
svn path=/trunk/; revision=25618
-rw-r--r-- | epan/dissectors/packet-cigi.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-dcc.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-dcerpc-mapi.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-dcerpc-rs_acct.c | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-dcom.c | 46 | ||||
-rw-r--r-- | epan/dissectors/packet-dcp-etsi.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-dec-dnart.c | 28 | ||||
-rw-r--r-- | epan/dissectors/packet-dhcp-failover.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-dhcpv6.c | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-diameter.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-dlm3.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-dmp.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-dns.c | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-dtpt.c | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-dvmrp.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-edonkey.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-epl.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-fcdns.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-fr.c | 40 | ||||
-rw-r--r-- | epan/dissectors/pidl/mapi/request.cnf.c | 10 |
20 files changed, 135 insertions, 139 deletions
diff --git a/epan/dissectors/packet-cigi.c b/epan/dissectors/packet-cigi.c index 18702a9a68..96c9698da5 100644 --- a/epan/dissectors/packet-cigi.c +++ b/epan/dissectors/packet-cigi.c @@ -2096,7 +2096,7 @@ packet_is_cigi(tvbuff_t *tvb) { guint8 packet_id; guint8 packet_size; - guint8 cigi_version; + guint8 cigi_version_local; guint8 ig_mode; /* CIGI 3 */ @@ -2108,14 +2108,14 @@ packet_is_cigi(tvbuff_t *tvb) } packet_id = tvb_get_guint8(tvb, 0); packet_size = tvb_get_guint8(tvb, 1); - cigi_version = tvb_get_guint8(tvb, 2); + cigi_version_local = tvb_get_guint8(tvb, 2); if ( packet_size > tvb_reported_length(tvb) ) { return FALSE; } /* Currently there are only 3 versions of CIGI */ - switch ( cigi_version ) { + switch ( cigi_version_local ) { case CIGI_VERSION_1: /* CIGI 1 requires that the first packet is always the IG Control or SOF */ diff --git a/epan/dissectors/packet-dcc.c b/epan/dissectors/packet-dcc.c index 3fe8e6db71..49ad685384 100644 --- a/epan/dissectors/packet-dcc.c +++ b/epan/dissectors/packet-dcc.c @@ -333,9 +333,9 @@ dissect_dcc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DCC_OP_ADMN: if ( is_response ) { - int left = tvb_length_remaining(tvb, offset) - + int left_local = tvb_length_remaining(tvb, offset) - sizeof(DCC_SIGNATURE); - if ( left == sizeof(DCC_ADMN_RESP_CLIENTS) ) + if ( left_local == sizeof(DCC_ADMN_RESP_CLIENTS) ) { D_LABEL("Addr", 16); D_LABEL("Id", sizeof(DCC_CLNT_ID)); diff --git a/epan/dissectors/packet-dcerpc-mapi.c b/epan/dissectors/packet-dcerpc-mapi.c index 21dec6d952..b1b5f081c3 100644 --- a/epan/dissectors/packet-dcerpc-mapi.c +++ b/epan/dissectors/packet-dcerpc-mapi.c @@ -4192,7 +4192,7 @@ mapi_dissect_element_EcDoRpc_MAPI_REQ_UNION_OpenMsgStore(tvbuff_t *tvb _U_, int guint32 codepage; guint32 padding; guint8 row; - guint16 strlen; + guint16 str_len; gchar *mailbox; origin_offset = offset; old_offset = offset; @@ -4212,12 +4212,12 @@ mapi_dissect_element_EcDoRpc_MAPI_REQ_UNION_OpenMsgStore(tvbuff_t *tvb _U_, int offset += 1; proto_tree_add_text(tree, tvb, old_offset, offset - old_offset, "row: 0x%x", row); old_offset = offset; - strlen = tvb_get_letohs(tvb, offset); + str_len = tvb_get_letohs(tvb, offset); offset += 2; - proto_tree_add_text(tree, tvb, old_offset, offset - old_offset, "str length: 0x%x", strlen); + proto_tree_add_text(tree, tvb, old_offset, offset - old_offset, "str length: 0x%x", str_len); old_offset = offset; - mailbox = tvb_format_text(tvb, offset, strlen - 1); - offset += strlen; + mailbox = tvb_format_text(tvb, offset, str_len - 1); + offset += str_len; proto_tree_add_text(tree, tvb, old_offset, offset - old_offset, "mailbox: %s", mailbox); proto_item_set_len(item, offset - origin_offset); return offset; diff --git a/epan/dissectors/packet-dcerpc-rs_acct.c b/epan/dissectors/packet-dcerpc-rs_acct.c index 0586bf7dd3..1e11b8649e 100644 --- a/epan/dissectors/packet-dcerpc-rs_acct.c +++ b/epan/dissectors/packet-dcerpc-rs_acct.c @@ -65,7 +65,7 @@ rs_acct_dissect_lookup_rqst (tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { guint32 key_size; - const char *key_t = NULL; + const char *keyx_t = NULL; offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rs_acct_lookup_rqst_var, NULL); @@ -74,12 +74,12 @@ rs_acct_dissect_lookup_rqst (tvbuff_t *tvb, int offset, if (key_size){ /* Not able to yet decipher the OTHER versions of this call just yet. */ proto_tree_add_string (tree, hf_rs_acct_lookup_rqst_key_t, tvb, offset, hf_rs_acct_lookup_rqst_key_size, tvb_get_ptr (tvb, offset, key_size)); - key_t = (const char *)tvb_get_ptr(tvb,offset,key_size); + keyx_t = (const char *)tvb_get_ptr(tvb,offset,key_size); offset += key_size; if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, - " Request for: %s ", key_t); + " Request for: %s ", keyx_t); } } else { if (check_col(pinfo->cinfo, COL_INFO)) { @@ -98,7 +98,7 @@ rs_acct_dissect_get_projlist_rqst (tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { guint32 key_size; - const char *key_t = NULL; + const char *keyx_t = NULL; offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rs_acct_get_projlist_rqst_var1, NULL); @@ -108,12 +108,12 @@ rs_acct_dissect_get_projlist_rqst (tvbuff_t *tvb, int offset, proto_tree_add_string (tree, hf_rs_acct_get_projlist_rqst_key_t, tvb, offset, hf_rs_acct_get_projlist_rqst_key_size, tvb_get_ptr (tvb, offset, key_size)); - key_t = (const char *)tvb_get_ptr(tvb,offset,key_size); + keyx_t = (const char *)tvb_get_ptr(tvb,offset,key_size); offset += key_size; if (check_col(pinfo->cinfo, COL_INFO)) { col_append_fstr(pinfo->cinfo, COL_INFO, - " Request for: %s", key_t); + " Request for: %s", keyx_t); } return offset; diff --git a/epan/dissectors/packet-dcom.c b/epan/dissectors/packet-dcom.c index 439dfe8dcd..fb0f7889d2 100644 --- a/epan/dissectors/packet-dcom.c +++ b/epan/dissectors/packet-dcom.c @@ -222,10 +222,10 @@ static e_uuid_t uuid_debug_ext = { 0xf1f19680, 0x4d2a, 0x11ce, { 0xa6, 0x6a, static e_uuid_t uuid_ext_error_ext ={ 0xf1f19681, 0x4d2a, 0x11ce, { 0xa6, 0x6a, 0x00, 0x20, 0xaf, 0x6e, 0x72, 0xf4} }; /* general DCOM UUIDs */ -static e_uuid_t ipid_rem_unknown = { 0x00000131, 0x1234, 0x5678, { 0xCA, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} }; -static e_uuid_t iid_unknown = { 0x00000000, 0x0000, 0x0000, { 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} }; -static e_uuid_t uuid_null = { 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; -static e_uuid_t iid_class_factory = { 0x00000001, 0x0000, 0x0000, { 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} }; +static const e_uuid_t ipid_rem_unknown = { 0x00000131, 0x1234, 0x5678, { 0xCA, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} }; +static const e_uuid_t iid_unknown = { 0x00000000, 0x0000, 0x0000, { 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} }; +static const e_uuid_t uuid_null = { 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; +static const e_uuid_t iid_class_factory = { 0x00000001, 0x0000, 0x0000, { 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} }; GList *dcom_machines; GList *dcom_interfaces; @@ -270,7 +270,6 @@ dcom_interface_t *dcom_interface_find(packet_info *pinfo _U_, const guint8 *ip _ { dcom_interface_t *interf; GList *interfaces; - static const e_uuid_t uuid_null = DCERPC_UUID_NULL; if(memcmp(ipid, &uuid_null, sizeof(uuid_null)) == 0) @@ -292,7 +291,6 @@ dcom_interface_t *dcom_interface_find(packet_info *pinfo _U_, const guint8 *ip _ dcom_interface_t *dcom_interface_new(packet_info *pinfo, const guint8 *ip, e_uuid_t *iid, guint64 oxid, guint64 oid, e_uuid_t *ipid) { - static const e_uuid_t uuid_null = DCERPC_UUID_NULL; GList *dcom_iter; dcom_machine_t *machine; dcom_object_t *object; @@ -786,9 +784,8 @@ dissect_dcom_this(tvbuff_t *tvb, int offset, proto_item *sub_item; proto_tree *sub_tree; guint32 u32SubStart; - proto_item *pi; - dcerpc_info *info = (dcerpc_info *)pinfo->private_data; - e_uuid_t uuid_null = DCERPC_UUID_NULL; + proto_item *pi; + dcerpc_info *info = (dcerpc_info *)pinfo->private_data; sub_item = proto_tree_add_protocol_format(tree, proto_dcom, tvb, offset, 0, @@ -807,19 +804,19 @@ dissect_dcom_this(tvbuff_t *tvb, int offset, offset = dissect_dcom_UUID(tvb, offset, pinfo, sub_tree, drep, hf_dcom_this_cid, &uuidCausality); - offset = dissect_dcom_extent(tvb, offset, pinfo, sub_tree, drep); + offset = dissect_dcom_extent(tvb, offset, pinfo, sub_tree, drep); /* update subtree header */ proto_item_append_text(sub_item, ", V%u.%u, Causality ID: %s", u16VersionMajor, u16VersionMinor, guids_resolve_uuid_to_str(&uuidCausality)); proto_item_set_len(sub_item, offset - u32SubStart); - if(memcmp(&info->call_data->object_uuid, &uuid_null, sizeof(uuid_null)) != 0) { - pi = proto_tree_add_guid_format(tree, hf_dcom_ipid, tvb, offset, 0, - (e_guid_t *) &info->call_data->object_uuid, - "Object UUID/IPID: %s", guids_resolve_uuid_to_str(&info->call_data->object_uuid)); + if(memcmp(&info->call_data->object_uuid, &uuid_null, sizeof(uuid_null)) != 0) { + pi = proto_tree_add_guid_format(tree, hf_dcom_ipid, tvb, offset, 0, + (e_guid_t *) &info->call_data->object_uuid, + "Object UUID/IPID: %s", guids_resolve_uuid_to_str(&info->call_data->object_uuid)); PROTO_ITEM_SET_GENERATED(pi); - } + } return offset; } @@ -833,9 +830,8 @@ dissect_dcom_that(tvbuff_t *tvb, int offset, proto_item *sub_item; proto_tree *sub_tree; guint32 u32SubStart; - proto_item *pi; - dcerpc_info *info = (dcerpc_info *)pinfo->private_data; - e_uuid_t uuid_null = DCERPC_UUID_NULL; + proto_item *pi; + dcerpc_info *info = (dcerpc_info *)pinfo->private_data; sub_item = proto_tree_add_protocol_format(tree, proto_dcom, tvb, offset, 0, @@ -846,17 +842,17 @@ dissect_dcom_that(tvbuff_t *tvb, int offset, hf_dcom_that_flags, &u32Flags); u32SubStart = offset - 4; - offset = dissect_dcom_extent(tvb, offset, pinfo, sub_tree, drep); + offset = dissect_dcom_extent(tvb, offset, pinfo, sub_tree, drep); /* update subtree header */ proto_item_set_len(sub_item, offset - u32SubStart); - if(memcmp(&info->call_data->object_uuid, &uuid_null, sizeof(uuid_null)) != 0) { - pi = proto_tree_add_guid_format(tree, hf_dcom_ipid, tvb, offset, 0, - (e_guid_t *) &info->call_data->object_uuid, - "Object UUID/IPID: %s", guids_resolve_uuid_to_str(&info->call_data->object_uuid)); + if(memcmp(&info->call_data->object_uuid, &uuid_null, sizeof(uuid_null)) != 0) { + pi = proto_tree_add_guid_format(tree, hf_dcom_ipid, tvb, offset, 0, + (e_guid_t *) &info->call_data->object_uuid, + "Object UUID/IPID: %s", guids_resolve_uuid_to_str(&info->call_data->object_uuid)); PROTO_ITEM_SET_GENERATED(pi); - } + } return offset; } @@ -2323,6 +2319,6 @@ proto_reg_handoff_dcom (void) guids_add_uuid(&uuid_null, "NULL"); guids_add_uuid(&iid_class_factory, "IClassFactory"); - /* Currently, we have nothing to register for DCOM */ + /* Currently, we have nothing to register for DCOM */ } diff --git a/epan/dissectors/packet-dcp-etsi.c b/epan/dissectors/packet-dcp-etsi.c index 2556e5f24f..87c9c8f68d 100644 --- a/epan/dissectors/packet-dcp-etsi.c +++ b/epan/dissectors/packet-dcp-etsi.c @@ -227,7 +227,7 @@ dissect_pft_fec_detailed(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, gboolean fec _U_, guint16 rsk, guint16 rsz, - fragment_data *fd + fragment_data *fdx ) { guint16 decoded_size; @@ -249,10 +249,10 @@ dissect_pft_fec_detailed(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, rx_min = c_max*rsk/plen; if(rx_min*plen<c_max*rsk) rx_min++; - if (fd) + if (fdx) new_tvb = process_reassembled_data (tvb, offset, pinfo, "Reassembled Message", - fd, &dcp_frag_items, + fdx, &dcp_frag_items, NULL, tree); else { guint fragments=0; diff --git a/epan/dissectors/packet-dec-dnart.c b/epan/dissectors/packet-dec-dnart.c index 31901a0b39..ae7a219255 100644 --- a/epan/dissectors/packet-dec-dnart.c +++ b/epan/dissectors/packet-dec-dnart.c @@ -540,21 +540,21 @@ dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (!(msg_flags & RT_FLAGS_CTRL_MSG)) { /* It is not a routing control message */ proto_tree *nsp_msg_tree; - proto_item *ti; + proto_item *ti_local; guint8 nsp_msg_type; - guint16 dst_node, src_node; + guint16 dst_node_local, src_node_local; nsp_msg_type = tvb_get_guint8(tvb, offset); - ti = proto_tree_add_uint( + ti_local = proto_tree_add_uint( tree, hf_dec_nsp_msgs, tvb, offset, 1, nsp_msg_type); if (nsp_msg_type == NOP_MSG) { /* Only test data in this msg */ return; } - nsp_msg_tree = proto_item_add_subtree(ti, ett_dec_rt_nsp_msg); + nsp_msg_tree = proto_item_add_subtree(ti_local, ett_dec_rt_nsp_msg); /* Get past the nsp_msg_type */ offset++; - dst_node = tvb_get_letohs(tvb, offset); + dst_node_local = tvb_get_letohs(tvb, offset); proto_tree_add_item( nsp_msg_tree, hf_dec_rt_dst_node, tvb, offset, 2, TRUE); offset += 2; @@ -567,7 +567,7 @@ dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } /* All other messages have a source node */ - src_node = tvb_get_letohs(tvb, offset); + src_node_local = tvb_get_letohs(tvb, offset); proto_tree_add_item( nsp_msg_tree, hf_dec_rt_src_node, tvb, offset, 2, TRUE); offset += 2; @@ -842,20 +842,20 @@ do_hello_msg( up to 128 bytes of test data at the end. These data are left to be dissected as 'data'. */ - proto_item *ti, *ti_ether; + proto_item *ti_locala, *ti_ether; proto_tree *list_tree, *list_ether; guint8 image_len; guint8 item_len; - ti = proto_tree_add_item(tree, hf_dec_rt_elist, tvb, + ti_locala = proto_tree_add_item(tree, hf_dec_rt_elist, tvb, my_offset, 7, TRUE); my_offset += 7; /* image field is preceded by count of remainder of field */ image_len = tvb_get_guint8(tvb, my_offset); my_offset++; - ti = proto_tree_add_none_format(tree, hf_dec_rt_elist, + ti_locala = proto_tree_add_none_format(tree, hf_dec_rt_elist, tvb, my_offset, 1, "Router States"); - list_tree = proto_item_add_subtree(ti, ett_dec_rt_list); + list_tree = proto_item_add_subtree(ti_locala, ett_dec_rt_list); while (image_len > 0) { ti_ether = proto_tree_add_bytes(list_tree, hf_dec_rt_ename, tvb, my_offset, 7, tvb_get_ptr(tvb, my_offset, 7)); @@ -870,17 +870,17 @@ do_hello_msg( while (item_len > 0) { guint8 pristate; - proto_item *ti; + proto_item *ti_localb; proto_tree *pstate_tree; - ti = proto_tree_add_item(list_ether, hf_dec_rt_router_id, + ti_localb = proto_tree_add_item(list_ether, hf_dec_rt_router_id, tvb, my_offset, 6, TRUE); addr = dnet_ntoa(ep_tvb_memdup(tvb, my_offset, 6)); if (addr != NULL) { - proto_item_append_text(ti, " (%s)", addr); + proto_item_append_text(ti_localb, " (%s)", addr); } my_offset += 6; - pstate_tree = proto_item_add_subtree(ti, ett_dec_rt_state); + pstate_tree = proto_item_add_subtree(ti_localb, ett_dec_rt_state); pristate = tvb_get_guint8(tvb, my_offset); proto_tree_add_string(list_ether, hf_dec_rt_router_state, tvb, my_offset, 1, diff --git a/epan/dissectors/packet-dhcp-failover.c b/epan/dissectors/packet-dhcp-failover.c index 03b37ab4d9..f2d7d8a8e5 100644 --- a/epan/dissectors/packet-dhcp-failover.c +++ b/epan/dissectors/packet-dhcp-failover.c @@ -357,7 +357,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) int poffset; guint32 xid; const gchar *tls_request_string; - nstime_t time; + nstime_t timex; guint32 lease_expiration_time, grace_expiration_time; guint32 potential_expiration_time, client_last_transaction_time; guint32 start_time_of_state; @@ -447,11 +447,11 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * Also, we need a way to keep from displaying nanoseconds, * so as not to make it look as if it has higher */ - time.secs = tvb_get_ntohl(tvb, offset); - time.nsecs = 0; + timex.secs = tvb_get_ntohl(tvb, offset); + timex.nsecs = 0; proto_tree_add_time_format_value(dhcpfo_tree, hf_dhcpfo_time, tvb, - offset, 4, &time, "%s", - abs_time_secs_to_str(time.secs)); + offset, 4, &timex, "%s", + abs_time_secs_to_str(timex.secs)); } offset += 4; diff --git a/epan/dissectors/packet-dhcpv6.c b/epan/dissectors/packet-dhcpv6.c index 110e94fafc..51c0908352 100644 --- a/epan/dissectors/packet-dhcpv6.c +++ b/epan/dissectors/packet-dhcpv6.c @@ -865,7 +865,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, case OPTION_LQ_QUERY: { guint8 query_type; - struct e_in6_addr in6; + struct e_in6_addr in6_local; if (optlen < 17) { proto_tree_add_text(subtree, tvb, off, optlen, @@ -890,9 +890,9 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, "unknown?", query_type); break; } - tvb_get_ipv6(tvb, off + 1, &in6); + tvb_get_ipv6(tvb, off + 1, &in6_local); proto_tree_add_text(subtree, tvb, off + 1, 16, - "Link address: %s", ip6_to_str(&in6)); + "Link address: %s", ip6_to_str(&in6_local)); temp_optlen = 17; while ((optlen - temp_optlen) > 0) { temp_optlen += dhcpv6_option(tvb, pinfo, subtree, @@ -956,7 +956,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, { guint32 preferred_lifetime, valid_lifetime; guint8 prefix_length; - struct e_in6_addr in6; + struct e_in6_addr in6_local; if (optlen < 25) { proto_tree_add_text(subtree, tvb, off, @@ -983,10 +983,10 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, } proto_tree_add_text(subtree, tvb, off + 8, 1, "Prefix length: %d", prefix_length); - tvb_get_ipv6(tvb, off + 9, &in6); + tvb_get_ipv6(tvb, off + 9, &in6_local); proto_tree_add_text(subtree, tvb, off + 9, 16, "Prefix address: %s", - ip6_to_str(&in6)); + ip6_to_str(&in6_local)); temp_optlen = 25; while ((optlen - temp_optlen) > 0) { diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c index 93145707b0..ef13383e89 100644 --- a/epan/dissectors/packet-diameter.c +++ b/epan/dissectors/packet-diameter.c @@ -499,9 +499,9 @@ static const char* time_avp(diam_ctx_t* c, diam_avp_t* a, tvbuff_t* tvb) { proto_item* pi; if ( len != 4 ) { - proto_item* pi = proto_tree_add_text(c->tree, tvb, 0, 4, - "Error! AVP value MUST be 4 bytes"); - expert_add_info_format(c->pinfo, pi, PI_MALFORMED, PI_NOTE, + proto_item* pi_local = proto_tree_add_text(c->tree, tvb, 0, 4, + "Error! AVP value MUST be 4 bytes"); + expert_add_info_format(c->pinfo, pi_local, PI_MALFORMED, PI_NOTE, "Bad Timestamp Length (%u)", len); return "[Malformed]"; } @@ -681,8 +681,8 @@ static void dissect_diameter_common(tvbuff_t* tvb, packet_info* pinfo, proto_tre default: { proto_tree* pt = proto_item_add_subtree(version_item,ett_err); - proto_item* pi = proto_tree_add_text(pt,tvb,0,1,"Unknown Diameter Version (decoding as RFC 3588)"); - expert_add_info_format(pinfo, pi, PI_UNDECODED, PI_WARN, "Unknown Diameter Version"); + proto_item* pi_local = proto_tree_add_text(pt,tvb,0,1,"Unknown Diameter Version (decoding as RFC 3588)"); + expert_add_info_format(pinfo, pi_local, PI_UNDECODED, PI_WARN, "Unknown Diameter Version"); PROTO_ITEM_SET_GENERATED(pi); c->version_rfc = TRUE; cmd_vs = VND_CMD_VS(&no_vnd); diff --git a/epan/dissectors/packet-dlm3.c b/epan/dissectors/packet-dlm3.c index e0a617c003..9ed911c340 100644 --- a/epan/dissectors/packet-dlm3.c +++ b/epan/dissectors/packet-dlm3.c @@ -1240,7 +1240,7 @@ proto_register_dlm3(void) void proto_reg_handoff_dlm3(void) { - static gboolean register_dissector = FALSE; + static gboolean dissector_registered = FALSE; static int tcp_port = 0; static int sctp_port = 0; @@ -1248,7 +1248,7 @@ proto_reg_handoff_dlm3(void) static dissector_handle_t dlm3_tcp_handle; static dissector_handle_t dlm3_sctp_handle; - if (register_dissector) { + if (dissector_registered) { dissector_delete("tcp.port", tcp_port, dlm3_tcp_handle); dissector_delete("sctp.port", sctp_port, dlm3_sctp_handle); } else { @@ -1256,7 +1256,7 @@ proto_reg_handoff_dlm3(void) proto_dlm3); dlm3_tcp_handle = new_create_dissector_handle(dissect_dlm3, proto_dlm3); - register_dissector = TRUE; + dissector_registered = TRUE; } tcp_port = dlm3_tcp_port; diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c index c27a326b74..02018ff6a6 100644 --- a/epan/dissectors/packet-dmp.c +++ b/epan/dissectors/packet-dmp.c @@ -1128,8 +1128,8 @@ static gboolean dmp_dec_xbyte_sic (guint64 bin, gchar *sic, static guint dmp_id_hash (gconstpointer k) { - dmp_id_key *dmp=(dmp_id_key *)k; - return dmp->id; + dmp_id_key *dmpx=(dmp_id_key *)k; + return dmpx->id; } static gint dmp_id_hash_equal (gconstpointer k1, gconstpointer k2) @@ -2987,7 +2987,7 @@ static gint dissect_dmp_notification (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *notif_tree = NULL; proto_tree *field_tree = NULL; proto_item *en = NULL, *tf = NULL; - guint8 notif, rec_time, on_type = 0xFF; + guint8 notif, rec_time, on_typex = 0xFF; gint len, boffset = offset; gint32 secs = 0; @@ -3024,7 +3024,7 @@ static gint dissect_dmp_notification (tvbuff_t *tvb, packet_info *pinfo _U_, if (dmp.notif_type == ON) { /* ON Type */ - on_type = tvb_get_guint8 (tvb, offset); + on_typex = tvb_get_guint8 (tvb, offset); proto_tree_add_item (notif_tree, hf_notif_on_type, tvb, offset, 1, FALSE); offset += 1; @@ -3047,7 +3047,7 @@ static gint dissect_dmp_notification (tvbuff_t *tvb, packet_info *pinfo _U_, } offset += len; - if ((dmp.notif_type == ON) && (on_type < 0x03)) { + if ((dmp.notif_type == ON) && (on_typex < 0x03)) { /* ACP127 Receipient */ len = tvb_strsize (tvb, offset); tf = proto_tree_add_uint_format (notif_tree, hf_notif_acp127, diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index 4c6aaeb890..8be77e83f5 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -995,7 +995,7 @@ compute_key_id(tvbuff_t *tvb, int offset, int size, guint8 algo) static int -dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset, +dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, column_info *cinfo, proto_tree *dns_tree, packet_info *pinfo, gboolean is_mdns) { @@ -1016,10 +1016,10 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset, proto_tree *rr_tree = NULL; proto_item *trr = NULL; - data_start = data_offset = offset; - cur_offset = offset; + data_start = data_offset = offsetx; + cur_offset = offsetx; - len = get_dns_name_type_class(tvb, offset, dns_data_offset, &name, &name_len, + len = get_dns_name_type_class(tvb, offsetx, dns_data_offset, &name, &name_len, &type, &class); data_offset += len; cur_offset += len; @@ -1053,17 +1053,17 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset, */ name_out = format_text(name, strlen(name)); if (type != T_OPT) { - trr = proto_tree_add_text(dns_tree, tvb, offset, + trr = proto_tree_add_text(dns_tree, tvb, offsetx, (data_offset - data_start) + data_len, "%s: type %s, class %s", name_out, type_name, class_name); - rr_tree = add_rr_to_tree(trr, ett_dns_rr, tvb, offset, name, name_len, + rr_tree = add_rr_to_tree(trr, ett_dns_rr, tvb, offsetx, name, name_len, type, class, flush, ttl, data_len, is_mdns); } else { - trr = proto_tree_add_text(dns_tree, tvb, offset, + trr = proto_tree_add_text(dns_tree, tvb, offsetx, (data_offset - data_start) + data_len, "%s: type %s", name_out, type_name); - rr_tree = add_opt_rr_to_tree(trr, ett_dns_rr, tvb, offset, name, name_len, + rr_tree = add_opt_rr_to_tree(trr, ett_dns_rr, tvb, offsetx, name, name_len, type, class, flush, ttl, data_len, is_mdns); } if (is_mdns && flush) diff --git a/epan/dissectors/packet-dtpt.c b/epan/dissectors/packet-dtpt.c index 396c00a905..f808ffa6ec 100644 --- a/epan/dissectors/packet-dtpt.c +++ b/epan/dissectors/packet-dtpt.c @@ -361,16 +361,16 @@ dissect_dtpt_sockaddr(tvbuff_t *tvb, guint offset, proto_tree *tree, int hfindex switch (family) { case AF_INET: { guint16 port; - guint32 address; + guint32 addr; port = tvb_get_ntohs(tvb,offset+2); proto_tree_add_uint(sockaddr_tree, hf_dtpt_sockaddr_port, tvb, offset+2,2,port); - address = tvb_get_ipv4(tvb,offset+4); + addr = tvb_get_ipv4(tvb,offset+4); proto_tree_add_ipv4(sockaddr_tree, hf_dtpt_sockaddr_address, - tvb, offset+4,4,address); + tvb, offset+4,4,addr); proto_tree_add_text(sockaddr_tree, tvb, offset+8, 8, "Padding"); - proto_item_append_text(sockaddr_item, ": %s:%d", ip_to_str((guint8*)&address), port); + proto_item_append_text(sockaddr_item, ": %s:%d", ip_to_str((guint8*)&addr), port); } break; } @@ -385,17 +385,17 @@ dissect_dtpt_sockaddr(tvbuff_t *tvb, guint offset, proto_tree *tree, int hfindex switch (family) { case AF_INET: { guint16 port; - guint32 address; + guint32 addr; proto_tree_add_text(sockaddr_tree, tvb, offset+4, 4, "Padding"); port = tvb_get_ntohs(tvb,offset+8); proto_tree_add_uint(sockaddr_tree, hf_dtpt_sockaddr_port, tvb, offset+8,2,port); - address = tvb_get_ipv4(tvb,offset+10); + addr = tvb_get_ipv4(tvb,offset+10); proto_tree_add_ipv4(sockaddr_tree, hf_dtpt_sockaddr_address, - tvb, offset+10,4,address); + tvb, offset+10,4,addr); proto_tree_add_text(sockaddr_tree, tvb, offset+14, 16, "Padding"); - proto_item_append_text(sockaddr_item, ": %s:%d", ip_to_str((guint8*)&address), port); + proto_item_append_text(sockaddr_item, ": %s:%d", ip_to_str((guint8*)&addr), port); } break; } diff --git a/epan/dissectors/packet-dvmrp.c b/epan/dissectors/packet-dvmrp.c index 2a5102769c..ec50351fc3 100644 --- a/epan/dissectors/packet-dvmrp.c +++ b/epan/dissectors/packet-dvmrp.c @@ -248,7 +248,7 @@ dissect_v3_report(tvbuff_t *tvb, proto_tree *parent_tree, int offset) while (tvb_reported_length_remaining(tvb, offset) > 0) { proto_tree *tree; proto_item *item; - int old_offset = offset; + int old_offset_a = offset; item = proto_tree_add_item(parent_tree, hf_route, tvb, offset, -1, FALSE); @@ -270,7 +270,7 @@ dissect_v3_report(tvbuff_t *tvb, proto_tree *parent_tree, int offset) /* read every srcnet, metric pairs */ do { - int old_offset = offset; + int old_offset_b = offset; m0 = 0xff; s0 = 0; @@ -303,7 +303,7 @@ dissect_v3_report(tvbuff_t *tvb, proto_tree *parent_tree, int offset) ip = (ip<<8)|s1; ip = (ip<<8)|s0; proto_tree_add_ipv4_format(tree, hf_saddr, tvb, - old_offset, offset-old_offset, ip, + old_offset_b, offset-old_offset_b, ip, "%s %d.%d.%d.%d (netmask %d.%d.%d.%d)", m0?"Source Network":"Default Route", s0,s1,s2,s3,m0,m1,m2,m3); @@ -316,7 +316,7 @@ dissect_v3_report(tvbuff_t *tvb, proto_tree *parent_tree, int offset) } while (!(metric&0x80)); - proto_item_set_len(item, offset-old_offset); + proto_item_set_len(item, offset-old_offset_a); } return offset; diff --git a/epan/dissectors/packet-edonkey.c b/epan/dissectors/packet-edonkey.c index d534792e83..2fcce6b636 100644 --- a/epan/dissectors/packet-edonkey.c +++ b/epan/dissectors/packet-edonkey.c @@ -542,12 +542,12 @@ static guint8 edonkey_metatag_name_get_type(tvbuff_t *tvb, gint start, gint leng guint8 *tag_name; if (match_strval(special_tagtype, edonkey_special_tags) == NULL) { - gint index; + gint idx; tag_name = tvb_get_ephemeral_string(tvb, start, length); - index = lookup_str_index(tag_name, length, edonkey_special_tags); - if (index < 0) + idx = lookup_str_index(tag_name, length, edonkey_special_tags); + if (idx < 0) return EDONKEY_STAG_UNKNOWN; - else return edonkey_special_tags[index].value; + else return edonkey_special_tags[idx].value; } else return special_tagtype; diff --git a/epan/dissectors/packet-epl.c b/epan/dissectors/packet-epl.c index a8cf493d97..68aedc85f4 100644 --- a/epan/dissectors/packet-epl.c +++ b/epan/dissectors/packet-epl.c @@ -1090,7 +1090,7 @@ gint dissect_epl_sdo_command(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset) { guint8 segmented, command_id; - gboolean response, abort; + gboolean response, abort_flag; guint32 abort_code; guint16 segment_size; @@ -1099,10 +1099,10 @@ dissect_epl_sdo_command(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, command_id = tvb_get_guint8(tvb, offset + 2); - abort = tvb_get_guint8(tvb, offset + 1) & EPL_ASND_SDO_CMD_ABORT_FILTER; + abort_flag = tvb_get_guint8(tvb, offset + 1) & EPL_ASND_SDO_CMD_ABORT_FILTER; /* test if CommandField == empty */ - if (command_id != 0 || abort) + if (command_id != 0 || abort_flag) { segmented = (tvb_get_guint8(tvb, offset + 1) & EPL_ASND_SDO_CMD_SEGMENTATION_FILTER) >> 4; response = tvb_get_guint8(tvb, offset + 1) & EPL_ASND_SDO_CMD_RESPONSE_FILTER; @@ -1144,7 +1144,7 @@ dissect_epl_sdo_command(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, offset += 4; } - if (abort) + if (abort_flag) { abort_code = tvb_get_letohl(tvb, offset); /* if AbortBit is set then print AbortMessage */ diff --git a/epan/dissectors/packet-fcdns.c b/epan/dissectors/packet-fcdns.c index 500495ee40..6815288c76 100644 --- a/epan/dissectors/packet-fcdns.c +++ b/epan/dissectors/packet-fcdns.c @@ -1444,15 +1444,15 @@ static void dissect_fcdns_gezn (tvbuff_t *tvb, proto_tree *req_tree, gboolean isreq) { int offset = 16; /* past the fc_ct header */ - int strlen; + int str_len; if (isreq) { if (req_tree) { - strlen = tvb_get_guint8 (tvb, offset); + str_len = tvb_get_guint8 (tvb, offset); proto_tree_add_text (req_tree, tvb, offset, 1, "Name Length: %d", - strlen); + str_len); proto_tree_add_string (req_tree, hf_fcdns_zonenm, tvb, offset+3, - strlen, tvb_get_ptr (tvb, offset+3, strlen)); + str_len, tvb_get_ptr (tvb, offset+3, str_len)); } } else { diff --git a/epan/dissectors/packet-fr.c b/epan/dissectors/packet-fr.c index 15835efa49..6ed77b671f 100644 --- a/epan/dissectors/packet-fr.c +++ b/epan/dissectors/packet-fr.c @@ -209,7 +209,7 @@ void capture_fr(const guchar *pd, int offset, int len, packet_counts *ld) { guint8 fr_octet; - guint32 address; + guint32 addr; guint8 fr_ctrl; guint8 fr_nlpid; @@ -234,7 +234,7 @@ capture_fr(const guchar *pd, int offset, int len, packet_counts *ld) * The first octet contains the upper 6 bits of the DLCI, as well * as the C/R bit. */ - address = (fr_octet & FRELAY_UPPER_DLCI) >> 2; + addr = (fr_octet & FRELAY_UPPER_DLCI) >> 2; offset++; /* @@ -246,7 +246,7 @@ capture_fr(const guchar *pd, int offset, int len, packet_counts *ld) return; } fr_octet = pd[offset]; - address = (address << 4) | ((fr_octet & FRELAY_SECOND_DLCI) >> 4); + addr = (addr << 4) | ((fr_octet & FRELAY_SECOND_DLCI) >> 4); offset++; if (!(fr_octet & FRELAY_EA)) { @@ -266,7 +266,7 @@ capture_fr(const guchar *pd, int offset, int len, packet_counts *ld) /* * 7 more bits of DLCI. */ - address = (address << 7) | ((fr_octet & FRELAY_THIRD_DLCI) >> 1); + addr = (addr << 7) | ((fr_octet & FRELAY_THIRD_DLCI) >> 1); offset++; if (!BYTES_ARE_IN_FRAME(offset, len, 1)) { ld->other++; @@ -298,7 +298,7 @@ capture_fr(const guchar *pd, int offset, int len, packet_counts *ld) /* * Last 6 bits of DLCI. */ - address = (address << 6) | ((fr_octet & FRELAY_LOWER_DLCI) >> 2); + addr = (addr << 6) | ((fr_octet & FRELAY_LOWER_DLCI) >> 2); } } @@ -356,7 +356,7 @@ capture_fr(const guchar *pd, int offset, int len, packet_counts *ld) break; } } else { - if (address == 0) { + if (addr == 0) { /* * This must be some sort of LAPF on DLCI 0 for SVC * because DLCI 0 is reserved for LMI and SVC signaling @@ -391,7 +391,7 @@ capture_fr(const guchar *pd, int offset, int len, packet_counts *ld) break; case RAW_ETHER: - if (address != 0) + if (addr != 0) capture_eth(pd, offset, len, ld); else ld->other++; @@ -410,7 +410,7 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *octet_tree = NULL; guint8 fr_octet; int is_response = FALSE; - guint32 address; + guint32 addr; guint8 fr_ctrl; guint16 fr_type; tvbuff_t *next_tvb; @@ -448,7 +448,7 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * XXX - is this FRF.12 frame relay fragmentation? If so, we * should dissect it as such, if possible. */ - address = 0; + addr = 0; if (tree) { proto_tree_add_text(fr_tree, tvb, offset, 1, "Bogus 1-octet address field"); @@ -459,7 +459,7 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * The first octet contains the upper 6 bits of the DLCI, as well * as the C/R bit. */ - address = (fr_octet & FRELAY_UPPER_DLCI) >> 2; + addr = (fr_octet & FRELAY_UPPER_DLCI) >> 2; is_response = (fr_octet & FRELAY_CR); if (tree) { octet_item = proto_tree_add_text(fr_tree, tvb, offset, 1, @@ -476,7 +476,7 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * BECN, and DE. */ fr_octet = tvb_get_guint8(tvb, offset); - address = (address << 4) | ((fr_octet & FRELAY_SECOND_DLCI) >> 4); + addr = (addr << 4) | ((fr_octet & FRELAY_SECOND_DLCI) >> 4); if (tree) { octet_item = proto_tree_add_text(fr_tree, tvb, offset, 1, "Second address octet: 0x%02x", @@ -503,7 +503,7 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* * 7 more bits of DLCI. */ - address = (address << 7) | ((fr_octet & FRELAY_THIRD_DLCI) >> 1); + addr = (addr << 7) | ((fr_octet & FRELAY_THIRD_DLCI) >> 1); if (tree) { octet_item = proto_tree_add_text(fr_tree, tvb, offset, 1, "Third address octet: 0x%02x", @@ -546,7 +546,7 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* * Last 6 bits of DLCI. */ - address = (address << 6) | ((fr_octet & FRELAY_LOWER_DLCI) >> 2); + addr = (addr << 6) | ((fr_octet & FRELAY_LOWER_DLCI) >> 2); proto_tree_add_uint(octet_tree, hf_fr_lower_dlci, tvb, offset, 1, fr_octet); } proto_tree_add_boolean(octet_tree, hf_fr_dc, tvb, offset, 1, fr_octet); @@ -557,19 +557,19 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } if (tree) { /* Put the full DLCI into the protocol tree. */ - proto_tree_add_uint(fr_tree, hf_fr_dlci, tvb, 0, offset, address); + proto_tree_add_uint(fr_tree, hf_fr_dlci, tvb, 0, offset, addr); } pinfo->ctype = CT_DLCI; - pinfo->circuit_id = address; + pinfo->circuit_id = addr; /* Add DLCI to a collumn */ if ( check_col(pinfo->cinfo, COL_FR_DLCI)) { - col_add_fstr(pinfo->cinfo, COL_FR_DLCI, "%u", address); + col_add_fstr(pinfo->cinfo, COL_FR_DLCI, "%u", addr); } if (check_col(pinfo->cinfo, COL_INFO)) - col_add_fstr(pinfo->cinfo, COL_INFO, "DLCI %u", address); + col_add_fstr(pinfo->cinfo, COL_INFO, "DLCI %u", addr); switch (fr_encap) { @@ -589,7 +589,7 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, */ dissect_fr_nlpid(tvb, offset, pinfo, tree, ti, fr_tree, fr_ctrl); } else { - if (address == 0) { + if (addr == 0) { /* * This must be some sort of LAPF on DLCI 0 for SVC * because DLCI 0 is reserved for LMI and SVC signaling @@ -632,7 +632,7 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, case GPRS_NS: next_tvb = tvb_new_subset(tvb, offset, -1, -1); - if (address != 0) + if (addr != 0) call_dissector(gprs_ns_handle, next_tvb, pinfo, tree); else dissect_lapf(next_tvb, pinfo, tree); @@ -640,7 +640,7 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, case RAW_ETHER: next_tvb = tvb_new_subset(tvb, offset, -1, -1); - if (address != 0) + if (addr != 0) call_dissector(eth_withfcs_handle, next_tvb, pinfo, tree); else dissect_lapf(next_tvb, pinfo, tree); diff --git a/epan/dissectors/pidl/mapi/request.cnf.c b/epan/dissectors/pidl/mapi/request.cnf.c index 2f67ef35a0..d1b267e548 100644 --- a/epan/dissectors/pidl/mapi/request.cnf.c +++ b/epan/dissectors/pidl/mapi/request.cnf.c @@ -297,7 +297,7 @@ mapi_dissect_element_EcDoRpc_MAPI_REQ_UNION_OpenMsgStore(tvbuff_t *tvb _U_, int guint32 codepage; guint32 padding; guint8 row; - guint16 strlen; + guint16 str_len; gchar *mailbox; origin_offset = offset; @@ -323,13 +323,13 @@ mapi_dissect_element_EcDoRpc_MAPI_REQ_UNION_OpenMsgStore(tvbuff_t *tvb _U_, int proto_tree_add_text(tree, tvb, old_offset, offset - old_offset, "row: 0x%x", row); old_offset = offset; - strlen = tvb_get_letohs(tvb, offset); + str_len = tvb_get_letohs(tvb, offset); offset += 2; - proto_tree_add_text(tree, tvb, old_offset, offset - old_offset, "str length: 0x%x", strlen); + proto_tree_add_text(tree, tvb, old_offset, offset - old_offset, "str length: 0x%x", str_len); old_offset = offset; - mailbox = tvb_format_text(tvb, offset, strlen - 1); - offset += strlen; + mailbox = tvb_format_text(tvb, offset, str_len - 1); + offset += str_len; proto_tree_add_text(tree, tvb, old_offset, offset - old_offset, "mailbox: %s", mailbox); proto_item_set_len(item, offset - origin_offset); |