diff options
Diffstat (limited to 'testprogs')
-rw-r--r-- | testprogs/filtertest.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/testprogs/filtertest.c b/testprogs/filtertest.c index 440b550d..15556d04 100644 --- a/testprogs/filtertest.c +++ b/testprogs/filtertest.c @@ -217,7 +217,6 @@ main(int argc, char **argv) int snaplen; char *p; int dlt; - int have_fcode = 0; bpf_u_int32 netmask = PCAP_NETMASK_UNKNOWN; char *cmdbuf; pcap_t *pd; @@ -340,7 +339,6 @@ main(int argc, char **argv) if (pcap_compile(pd, &fcode, cmdbuf, Oflag, netmask) < 0) error("%s", pcap_geterr(pd)); - have_fcode = 1; if (!bpf_validate(fcode.bf_insns, fcode.bf_len)) warn("Filter doesn't pass validation"); @@ -360,8 +358,7 @@ main(int argc, char **argv) bpf_dump(&fcode, dflag); free(cmdbuf); - if (have_fcode) - pcap_freecode (&fcode); + pcap_freecode (&fcode); pcap_close(pd); exit(0); } |