From ea8c283dc7e8afe57da4747e930bc9248d4a754f Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 20 May 2024 22:13:37 +0200 Subject: [PATCH] pcap-log: minor cleanup Use same pointer to one location consistently. --- src/log-pcap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/log-pcap.c b/src/log-pcap.c index a275eb3804..09538b5ef7 100644 --- a/src/log-pcap.c +++ b/src/log-pcap.c @@ -485,7 +485,7 @@ static inline int PcapWrite( pl->size_current += len; } #ifdef HAVE_LIBLZ4 - else if (pl->compression.format == PCAP_LOG_COMPRESSION_FORMAT_LZ4) { + else if (comp->format == PCAP_LOG_COMPRESSION_FORMAT_LZ4) { pcap_dump_flush(pl->pcap_dumper); long in_size = ftell(comp->pcap_buf_wrapper); if (in_size < 0) { @@ -498,7 +498,7 @@ static inline int PcapWrite( SCLogError("LZ4F_compressUpdate: %s", LZ4F_getErrorName(len)); return TM_ECODE_FAILED; } - if (fseek(pl->compression.pcap_buf_wrapper, 0, SEEK_SET) != 0) { + if (fseek(comp->pcap_buf_wrapper, 0, SEEK_SET) != 0) { SCLogError("fseek failed: %s", strerror(errno)); return TM_ECODE_FAILED; } -- 2.47.2