]> The Tcpdump Group git mirrors - libpcap/commit
Fix pcap_offline_read() loop.
authorGuy Harris <[email protected]>
Tue, 2 Nov 2021 23:47:29 +0000 (16:47 -0700)
committerGuy Harris <[email protected]>
Sun, 20 Feb 2022 23:22:54 +0000 (15:22 -0800)
commit63e133ce2fc0b02d1526cc8bbd859df63c159f76
tree11c42e2421ad990b8f4cd9ce8620aab8e09d3c67
parent6825abf40b6b37c4f37d9f972cf90b166ac21dd9
Fix pcap_offline_read() loop.

It should loop until either

1) we get an error reading packets, but we already do that;

2) we get an EOF reading packets, but we already do that;

3) we return the number of packets the caller asked for (if they
   asked for a given number), but we already do that;

so there's no need for the loop condition to check the status - and the
old test didn't work, as the meaning of the status returned by the
next_packet_op routine changed.

(cherry picked from commit 292ce0079b21df0dc34233e1b094a556d6b84753)
savefile.c