aboutsummaryrefslogtreecommitdiffstats
path: root/ui/cli
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 /ui/cli
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 'ui/cli')
-rw-r--r--ui/cli/tap-comparestat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/cli/tap-comparestat.c b/ui/cli/tap-comparestat.c
index 992666f443..286310103a 100644
--- a/ui/cli/tap-comparestat.c
+++ b/ui/cli/tap-comparestat.c
@@ -119,8 +119,8 @@ comparestat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const
/* so this get filled, usually with the first frame */
if (cs->eth_dst.len == 0) {
- cs->eth_dst = pinfo->dl_dst;
- cs->eth_src = pinfo->dl_src;
+ copy_address_shallow(&cs->eth_dst, &pinfo->dl_dst);
+ copy_address_shallow(&cs->eth_src, &pinfo->dl_src);
}
/* Set up the fields of the pseudo-header and create checksum */
@@ -145,7 +145,7 @@ comparestat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const
fInfo->num = pinfo->num;
fInfo->id = ci->ip_id;
fInfo->ip_ttl = ci->ip_ttl;
- fInfo->dl_dst = pinfo->dl_dst;
+ copy_address_shallow(&fInfo->dl_dst, &pinfo->dl_dst);
fInfo->abs_ts = pinfo->abs_ts;
/* clean memory */
nstime_set_zero(&fInfo->zebra_time);