Set a variable just before we start using it, making it a bit clearer
that packet counting is being done in that loop.
After an assignment, test the assigned-to variable; this makes it a bit
more like the equivalent loop in pcap-bpf.c.
{
PACKET Packet;
int cc;
- int n = 0;
+ int n;
register u_char *bp, *ep;
u_char *datap;
struct pcap_win *pw = p->priv;
cc = p->cc;
- if (p->cc == 0) {
+ if (cc == 0) {
/*
* Has "pcap_breakloop()" been called?
*/
* Loop through each packet.
*/
#define bhp ((struct bpf_hdr *)bp)
+ n = 0;
ep = bp + cc;
for (;;) {
register u_int caplen, hdrlen;