usr.sbin/tcpdump: fix -Wunused-but-set-variable warning

All "infile" handling was moved into priv_exec() when tcpdump was
priviledge separated.  The options are scanned both in priv_exec()
and in main(), so the empty case needs to remain in the latter.

ok?
 
M  usr.sbin/tcpdump/tcpdump.c

diff 812c6fb40ad70885ec0ec3a47d5ae49a0c43371d 
34d4cced9a849c8319a25fd1cc1a7567223349c3
blob - e0b6a4b318a21ba0c344204b7673dac3ca5dd657
blob + 50e793f63fab6e9aba2964e3a1c5eac289e06e08
--- usr.sbin/tcpdump/tcpdump.c
+++ usr.sbin/tcpdump/tcpdump.c
@@ -208,7 +208,7 @@ main(int argc, char **argv)
 {
        int cnt = -1, op, i;
        bpf_u_int32 localnet, netmask;
-       char *cp, *infile = NULL, *RFileName = NULL;
+       char *cp, *RFileName = NULL;
        char ebuf[PCAP_ERRBUF_SIZE], *WFileName = NULL;
        pcap_handler printer;
        struct bpf_program *fcode;
@@ -285,7 +285,6 @@ main(int argc, char **argv)
                        break;
 
                case 'F':
-                       infile = optarg;
                        break;
 
                case 'i':

-- 
Christian "naddy" Weisgerber                          [email protected]

Reply via email to