From: Victor Julien Date: Mon, 20 May 2024 20:13:37 +0000 (+0200) Subject: pcap-log: minor cleanup X-Git-Tag: suricata-8.0.0-beta1~1282 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea8c283dc7e8afe57da4747e930bc9248d4a754f;p=thirdparty%2Fsuricata.git pcap-log: minor cleanup Use same pointer to one location consistently. --- 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; }