aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/wimax/mac_hd_generic_decoder.c
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2015-11-26 04:44:52 +0000
committerJoão Valverde <j@v6e.pt>2016-02-26 23:09:43 +0000
commite4c059f67f3b29bcc26b1faf111bf647ac630e04 (patch)
tree8ec634d7614f7a32c09c5cdb60d7509fc2dd2208 /plugins/wimax/mac_hd_generic_decoder.c
parent92537916483ec721a638cdd7c416d099a45a9304 (diff)
Add free_address_wmem(), fix warnings [-Wcast-qual]
Try to improve address API and also fix some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Second try, now passing test suite. Change-Id: Idc101cd866b6d4f13500c9d59da5c7a38847fb7f Reviewed-on: https://code.wireshark.org/review/13946 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'plugins/wimax/mac_hd_generic_decoder.c')
-rw-r--r--plugins/wimax/mac_hd_generic_decoder.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/wimax/mac_hd_generic_decoder.c b/plugins/wimax/mac_hd_generic_decoder.c
index d2d644d94d..b5fc149827 100644
--- a/plugins/wimax/mac_hd_generic_decoder.c
+++ b/plugins/wimax/mac_hd_generic_decoder.c
@@ -1069,15 +1069,15 @@ static int dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo,
first_gmh = FALSE;
cid = cid_base + cid_adjust[cid_index] + cid_vernier[cid_index];
/* Save address pointers. */
- save_src = pinfo->src;
- save_dst = pinfo->dst;
+ copy_address_shallow(&save_src, &pinfo->src);
+ copy_address_shallow(&save_dst, &pinfo->dst);
/* Use dl_src and dl_dst in defragmentation. */
- pinfo->src = pinfo->dl_src;
- pinfo->dst = pinfo->dl_dst;
+ copy_address_shallow(&pinfo->src, &pinfo->dl_src);
+ copy_address_shallow(&pinfo->dst, &pinfo->dl_dst);
payload_frag = fragment_add_seq(&payload_reassembly_table, tvb, offset, pinfo, cid, NULL, frag_number[cid_index], frag_len, ((frag_type==LAST_FRAG)?0:1), 0);
/* Restore address pointers. */
- pinfo->src = save_src;
- pinfo->dst = save_dst;
+ copy_address_shallow(&pinfo->src, &save_src);
+ copy_address_shallow(&pinfo->dst, &save_dst);
if (frag_type == LAST_FRAG)
{
/* Make sure fragment_add_seq() sees next one as a new frame. */