From 83db3213e55a646132e092014e162ebfe16b7236 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 9 Sep 2014 14:32:23 +0200 Subject: [PATCH] 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 --- netsniff-ng.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/netsniff-ng.c b/netsniff-ng.c index eabd9421..03fab610 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) { -- 2.11.4.GIT