summaryrefslogtreecommitdiff
path: root/netsniff-ng.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2014-09-09 14:32:23 +0200
committerTobias Klauser <tklauser@distanz.ch>2014-09-09 14:32:23 +0200
commit83db3213e55a646132e092014e162ebfe16b7236 (patch)
tree4e69a8c32a36a84814d710cb7bbb01c4693433d2 /netsniff-ng.c
parent29e8d65ae49ef1c9435fb861b1fc55ef2305d7ed (diff)
netsniff-ng: Remove useless check for ctx.device_in
If ctx.device_in is NULL after option parsing, it is always set to "any", which is before this check. Thus, it serves no purpose and can be removed. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'netsniff-ng.c')
-rw-r--r--netsniff-ng.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c
index eabd942..03fab61 100644
--- a/netsniff-ng.c
+++ b/netsniff-ng.c
@@ -1419,8 +1419,7 @@ int main(int argc, char **argv)
set_sched_status(SCHED_FIFO, sched_get_priority_max(SCHED_FIFO));
}
- if (ctx.device_in && (device_mtu(ctx.device_in) ||
- !strncmp("any", ctx.device_in, strlen(ctx.device_in)))) {
+ if (device_mtu(ctx.device_in) || !strncmp("any", ctx.device_in, strlen(ctx.device_in))) {
if (!ctx.rfraw)
ctx.link_type = pcap_devtype_to_linktype(ctx.device_in);
if (!ctx.device_out) {