read_op loops do, to clarify that a zero or negative "cnt" value means
"loop until we run out of packets".
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-dag.c,v 1.35 2008-01-06 21:25:54 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-dag.c,v 1.36 2008-02-02 20:42:35 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
/* Only count packets that pass the filter, for consistency with standard Linux behaviour. */
processed++;
- if (processed == cnt)
+ if (processed == cnt && cnt > 0)
{
/* Reached the user-specified limit. */
return cnt;