From 077b787413c897781ca6ec70ca9de36f8a6be024 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Mon, 12 Jul 2021 14:40:21 -0700 Subject: [PATCH] etwdump: Fixup our rec struct syntax. Fix ``` C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\extcap\etl.c(590,10): error C2232: '->block': left operand has 'struct' type, use '.' [C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\build\extcap\etwdump.vcxproj] C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\extcap\etl.c(590,10): error C2232: rec->block = wtap_block_create(WTAP_BLOCK_PACKET); [C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\build\extcap\etwdump.vcxproj] C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\extcap\etl.c(590,10): error C2232: ^ [C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\build\extcap\etwdump.vcxproj] C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\extcap\etl.c(591,39): error C2232: '->block': left operand has 'struct' type, use '.' [C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\build\extcap\etwdump.vcxproj] C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\extcap\etl.c(591,39): error C2232: ^ [C:\gitlab-builds\builds\-fyeYoMP\0\wireshark\wireshark\build\extcap\etwdump.vcxproj] ``` --- extcap/etl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extcap/etl.c b/extcap/etl.c index 1c39fe8e89..4bdb83c754 100644 --- a/extcap/etl.c +++ b/extcap/etl.c @@ -587,8 +587,8 @@ void wtap_etl_rec_dump(ULARGE_INTEGER timestamp, WTAP_ETL_RECORD* etl_record, UL rec.rec_header.packet_header.caplen = total_packet_length; rec.rec_header.packet_header.len = total_packet_length; rec.rec_header.packet_header.pkt_encap = WTAP_ENCAP_ETW; - rec->block = wtap_block_create(WTAP_BLOCK_PACKET); - wtap_block_add_uint32_option(rec->block, OPT_PKT_FLAGS, is_inbound ? PACK_FLAGS_DIRECTION_INBOUND : PACK_FLAGS_DIRECTION_OUTBOUND); + rec.block = wtap_block_create(WTAP_BLOCK_PACKET); + wtap_block_add_uint32_option(rec.block, OPT_PKT_FLAGS, is_inbound ? PACK_FLAGS_DIRECTION_INBOUND : PACK_FLAGS_DIRECTION_OUTBOUND); /* Convert usec of the timestamp into nstime_t */ rec.ts.secs = (time_t)(timestamp.QuadPart / G_USEC_PER_SEC); rec.ts.nsecs = (int)(((timestamp.QuadPart % G_USEC_PER_SEC) * G_NSEC_PER_SEC) / G_USEC_PER_SEC);