forked from osmocom/wireshark
Create temporary variables for some proto_tree_add_<datatype> calculations.
checkAPIs.pl doesn't like tvb_get_* parameters because it thinks proto_tree_add_item should be used. This is just to pacify the check. Change-Id: I2df1233fe8c7976c257197079c06d24e472303b5 Reviewed-on: https://code.wireshark.org/review/21735 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
b3c6895191
commit
96d483764a
|
@ -694,7 +694,7 @@ display_req_forward(tvbuff_t *tvb, packet_info *pinfo,
|
|||
guint8 aid;
|
||||
const gchar* aname = NULL;
|
||||
const gchar* aval;
|
||||
guint16 aval_len, aname_len;
|
||||
guint16 aval_len, aname_len, key_len;
|
||||
|
||||
int apos = pos;
|
||||
|
||||
|
@ -722,10 +722,9 @@ display_req_forward(tvbuff_t *tvb, packet_info *pinfo,
|
|||
"%s: %s", aname, aval);
|
||||
} else if (aid == 0x0B ) {
|
||||
/* ssl_key_length */
|
||||
if (ajp13_tree) {
|
||||
proto_tree_add_uint(ajp13_tree, hf_ajp13_ssl_key_size,
|
||||
tvb, apos, 1+2, tvb_get_ntohs(tvb, pos));
|
||||
}
|
||||
key_len = tvb_get_ntohs(tvb, pos);
|
||||
proto_tree_add_uint(ajp13_tree, hf_ajp13_ssl_key_size,
|
||||
tvb, apos, 1+2, key_len);
|
||||
pos+=2;
|
||||
} else {
|
||||
|
||||
|
|
|
@ -3652,7 +3652,8 @@ dissect_cia(tvbuff_t *tvb, int offset, int pathpos, unsigned char segment_type,
|
|||
|
||||
if (generate)
|
||||
{
|
||||
*ret_item = proto_tree_add_uint(item, hf_cip_ext_logical_type, tvb, 0, 0, tvb_get_guint8(tvb, offset + pathpos + 1));
|
||||
temp_data = tvb_get_guint8(tvb, offset + pathpos + 1);
|
||||
*ret_item = proto_tree_add_uint(item, hf_cip_ext_logical_type, tvb, 0, 0, temp_data);
|
||||
PROTO_ITEM_SET_GENERATED(*ret_item);
|
||||
}
|
||||
else
|
||||
|
@ -4295,7 +4296,8 @@ static int dissect_cip_segment_single(packet_info *pinfo, tvbuff_t *tvb, int off
|
|||
/* Add Link Address */
|
||||
if ( generate )
|
||||
{
|
||||
it = proto_tree_add_uint(port_tree, hf_cip_link_address_byte, tvb, 0, 0, tvb_get_guint8( tvb, offset + pathpos + offset_link_address ) );
|
||||
temp_data = tvb_get_guint8( tvb, offset + pathpos + offset_link_address );
|
||||
it = proto_tree_add_uint(port_tree, hf_cip_link_address_byte, tvb, 0, 0, temp_data);
|
||||
PROTO_ITEM_SET_GENERATED(it);
|
||||
}
|
||||
else
|
||||
|
@ -4310,7 +4312,8 @@ static int dissect_cip_segment_single(packet_info *pinfo, tvbuff_t *tvb, int off
|
|||
{
|
||||
if (generate)
|
||||
{
|
||||
it = proto_tree_add_uint(port_tree, hf_cip_port_extended, tvb, 0, 0, tvb_get_letohs(tvb, extended_port_offset));
|
||||
temp_data = tvb_get_letohs(tvb, extended_port_offset);
|
||||
it = proto_tree_add_uint(port_tree, hf_cip_port_extended, tvb, 0, 0, temp_data);
|
||||
PROTO_ITEM_SET_GENERATED(it);
|
||||
}
|
||||
else
|
||||
|
@ -4690,7 +4693,8 @@ static int dissect_cip_segment_single(packet_info *pinfo, tvbuff_t *tvb, int off
|
|||
case CI_NETWORK_SEG_SCHEDULE:
|
||||
if (generate)
|
||||
{
|
||||
it = proto_tree_add_uint(net_tree, hf_cip_seg_schedule, tvb, 0, 0, tvb_get_guint8(tvb, offset + pathpos + 1));
|
||||
temp_data = tvb_get_guint8(tvb, offset + pathpos + 1);
|
||||
it = proto_tree_add_uint(net_tree, hf_cip_seg_schedule, tvb, 0, 0, temp_data);
|
||||
PROTO_ITEM_SET_GENERATED(it);
|
||||
}
|
||||
else
|
||||
|
@ -4707,7 +4711,8 @@ static int dissect_cip_segment_single(packet_info *pinfo, tvbuff_t *tvb, int off
|
|||
case CI_NETWORK_SEG_FIXED_TAG:
|
||||
if (generate)
|
||||
{
|
||||
it = proto_tree_add_uint(net_tree, hf_cip_seg_fixed_tag, tvb, 0, 0, tvb_get_guint8(tvb, offset + pathpos + 1));
|
||||
temp_data = tvb_get_guint8(tvb, offset + pathpos + 1);
|
||||
it = proto_tree_add_uint(net_tree, hf_cip_seg_fixed_tag, tvb, 0, 0, temp_data);
|
||||
PROTO_ITEM_SET_GENERATED(it);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -249,6 +249,7 @@ dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp
|
|||
guint16 num_tuples = 0;
|
||||
guint16 tuple_type = 0;
|
||||
guint16 tuple_length = 0;
|
||||
gchar* ipx_addr_str;
|
||||
|
||||
/* Set up structures needed to add the protocol subtree and manage it */
|
||||
proto_item *edp_ti, *ti;
|
||||
|
@ -467,9 +468,9 @@ dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp
|
|||
proto_tree_add_item(edp_tuples_leaf_tree, hf_ismp_system_description, tvb, offset, tuple_length, ENC_NA|ENC_ASCII);
|
||||
break;
|
||||
case EDP_TUPLE_IPX_ADDR:
|
||||
proto_tree_add_string(edp_tuples_leaf_tree, hf_ismp_interface_ipx_address ,tvb, offset, tuple_length,
|
||||
ipx_addr_to_str(tvb_get_ntohl(tvb, offset),
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, tuple_length-4, ENC_ASCII)));
|
||||
ipx_addr_str = ipx_addr_to_str(tvb_get_ntohl(tvb, offset),
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, tuple_length-4, ENC_ASCII));
|
||||
proto_tree_add_string(edp_tuples_leaf_tree, hf_ismp_interface_ipx_address ,tvb, offset, tuple_length, ipx_addr_str);
|
||||
break;
|
||||
case EDP_TUPLE_UNKNOWN:
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue