diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-06-26 18:02:12 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-06-26 18:02:12 -0700 |
commit | 0e34f5d742dbced0374217501ed9db1a79034b35 (patch) | |
tree | c751fc032c74ec21461d0b84b0675c7b5578da1b | |
parent | 066ee5ae71c8b9794436f4e203160c16d680e99b (diff) | |
download | tcpdump-0e34f5d742dbced0374217501ed9db1a79034b35.tar.gz |
Squelch a compiler warning.
It may not be necessary, but it makes the code a bit cleaner, even if
you spend a few extra microseconds per file fetching the name of the
link-layer header type even if the new file has the same header type.
-rw-r--r-- | tcpdump.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1849,7 +1849,6 @@ main(int argc, char **argv) */ dlt = new_dlt; ndo->ndo_if_printer = get_if_printer(ndo, dlt); - dlt_name = pcap_datalink_val_to_name(dlt); if (pcap_compile(pd, &fcode, cmdbuf, Oflag, netmask) < 0) error("%s", pcap_geterr(pd)); } @@ -1863,6 +1862,7 @@ main(int argc, char **argv) /* * Report the new file. */ + dlt_name = pcap_datalink_val_to_name(dlt); if (dlt_name == NULL) { fprintf(stderr, "reading from file %s, link-type %u\n", RFileName, dlt); |