diff -Naur a/testprogs/capturetest.c b/testprogs/capturetest.c --- a/testprogs/capturetest.c 2020-03-20 18:56:41.617563211 +0300 +++ b/testprogs/capturetest.c 2020-03-20 18:58:01.269554380 +0300 @@ -179,7 +179,7 @@ if (pcap_setnonblock(pd, nonblock, ebuf) == -1) error("pcap_setnonblock failed: %s", ebuf); printf("Listening on %s\n", device); - for (;;) { + for (int i = 0; i < 10; i++) { packet_count = 0; status = pcap_dispatch(pd, -1, countme, (u_char *)&packet_count); diff -Naur a/testprogs/selpolltest.c b/testprogs/selpolltest.c --- a/testprogs/selpolltest.c 2020-03-20 18:57:40.368556697 +0300 +++ b/testprogs/selpolltest.c 2020-03-20 18:58:51.492548811 +0300 @@ -193,7 +193,7 @@ error("pcap_setnonblock failed: %s", ebuf); } if (doselect) { - for (;;) { + for (int i = 0; i < 10; i++) { fd_set setread, setexcept; struct timeval seltimeout; @@ -262,7 +262,7 @@ } } } else if (dopoll) { - for (;;) { + for (int i = 0; i < 10; i++) { struct pollfd fd; int polltimeout; @@ -326,7 +326,7 @@ } } } else { - for (;;) { + for (int i = 0; i < 10; i++) { packet_count = 0; status = pcap_dispatch(pd, -1, countme, (u_char *)&packet_count);