diff options
author | Michael Mann <mmann78@netscape.net> | 2017-05-16 22:55:34 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-05-17 15:17:20 +0000 |
commit | 8376a8bb26d49145e83479268237c9afe6bdde81 (patch) | |
tree | f172af535cc2f80a3feb351b5facd283f525cf60 /epan/dissectors/packet-classicstun.c | |
parent | 99b76a5bc3db9579351c0fc7251086660f4f003f (diff) |
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: If40728bcdf5558c351999057321ffba5d802c7c7
Reviewed-on: https://code.wireshark.org/review/21694
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-classicstun.c')
-rw-r--r-- | epan/dissectors/packet-classicstun.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-classicstun.c b/epan/dissectors/packet-classicstun.c index c0d9e5e7ef..82a354bc7f 100644 --- a/epan/dissectors/packet-classicstun.c +++ b/epan/dissectors/packet-classicstun.c @@ -217,7 +217,8 @@ dissect_classicstun(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d guint16 msg_length; const char *msg_type_str; guint16 att_type; - guint16 att_length; + guint16 att_length, clear_port; + guint32 clear_ip; guint16 offset; guint len; guint i; @@ -491,9 +492,8 @@ dissect_classicstun(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d /* Show the port 'in the clear' XOR (host order) transid with (host order) xor-port. Add host-order port into tree. */ - ti = proto_tree_add_uint(att_tree, classicstun_att_port, tvb, offset+2, 2, - tvb_get_ntohs(tvb, offset+2) ^ - (transaction_id_first_word >> 16)); + clear_port = tvb_get_ntohs(tvb, offset+2) ^ (transaction_id_first_word >> 16); + ti = proto_tree_add_uint(att_tree, classicstun_att_port, tvb, offset+2, 2, clear_port); PROTO_ITEM_SET_GENERATED(ti); switch( tvb_get_guint8(tvb, offset+1) ){ @@ -505,8 +505,8 @@ dissect_classicstun(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d /* Show the address 'in the clear'. XOR (host order) transid with (host order) xor-address. Add in network order tree. */ - ti = proto_tree_add_ipv4(att_tree, classicstun_att_ipv4, tvb, offset+4, 4, - tvb_get_ipv4(tvb, offset+4) ^ g_htonl(transaction_id_first_word)); + clear_ip = tvb_get_ipv4(tvb, offset+4) ^ g_htonl(transaction_id_first_word); + ti = proto_tree_add_ipv4(att_tree, classicstun_att_ipv4, tvb, offset+4, 4, clear_ip); PROTO_ITEM_SET_GENERATED(ti); break; |