diff options
author | Michael Mann <mmann78@netscape.net> | 2015-02-26 22:03:12 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-03-01 12:54:33 +0000 |
commit | 9c55903029ee0e6720597ef07e8a5b359cae068e (patch) | |
tree | 251dddfa5de23777e225e128529b00a7a0143b76 /epan/dissectors/packet-smpp.c | |
parent | 5f2c8e9575eb6afb6c645d43a015cff035fcbeb0 (diff) |
Use COPY_ADDRESS_SHALLOW instead of duplicating TVB_SET_ADDRESS and SET_ADDRESS calls for the same address.
Change-Id: I0c9cc5d574fdd73ecf1f8b32dbbf0ddb2b885116
Reviewed-on: https://code.wireshark.org/review/7437
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-smpp.c')
-rw-r--r-- | epan/dissectors/packet-smpp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-smpp.c b/epan/dissectors/packet-smpp.c index 3c21667b5d..5d54bc16b1 100644 --- a/epan/dissectors/packet-smpp.c +++ b/epan/dissectors/packet-smpp.c @@ -1978,8 +1978,8 @@ submit_sm(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, { DebugLog(("UDHI present - set addresses\n")); /* Save original addresses */ - SET_ADDRESS(&save_src, pinfo->src.type, pinfo->src.len, pinfo->src.data); - SET_ADDRESS(&save_dst, pinfo->dst.type, pinfo->dst.len, pinfo->dst.data); + COPY_ADDRESS_SHALLOW(&save_src, &pinfo->src); + COPY_ADDRESS_SHALLOW(&save_dst, &pinfo->dst); /* Set SMPP source and destination address */ SET_ADDRESS(&(pinfo->src), AT_STRINGZ, 1+(int)strlen(src_str), src_str); SET_ADDRESS(&(pinfo->dst), AT_STRINGZ, 1+(int)strlen(dst_str), dst_str); @@ -1987,8 +1987,8 @@ submit_sm(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, MIN(length, tvb_reported_length(tvb) - offset), length); call_dissector (gsm_sms_handle, tvb_msg, pinfo, top_tree); /* Restore original addresses */ - SET_ADDRESS(&(pinfo->src), save_src.type, save_src.len, save_src.data ); - SET_ADDRESS(&(pinfo->dst), save_dst.type, save_dst.len, save_dst.data); + COPY_ADDRESS_SHALLOW(&pinfo->src, &save_src); + COPY_ADDRESS_SHALLOW(&pinfo->dst, &save_dst); } offset += length; } |