summaryrefslogtreecommitdiff
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-07 23:22:30 +0000
commit13ec77a9fc3af3b0b502820d0b55796c89997896 (patch)
treec5f5f72f090efd5471cf95095b00e13efa407959 /ui/cli
parentd762a895ab570680e4e72142a348ad2b07c97d4f (diff)
downloadwireshark-13ec77a9fc3af3b0b502820d0b55796c89997896.tar.gz
Add free_address_wmem() and other extensions to address API
Try to improve 'address' API (to be easier/safer) and also avoid some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Change-Id: I7456516b12c67620ceadac447907c12f5905bd49 Reviewed-on: https://code.wireshark.org/review/13463 Petri-Dish: João Valverde <j@v6e.pt> 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);