From 5284b5db92dd93bd807e611f7a2e4ec76a7664f5 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 12 Oct 2009 00:56:55 +0200 Subject: [PATCH] pknock: remove redundant final check for any-option Just below the check that was just removed, the presence of --name is tested for, as --name is always required. That makes the (flags == 0) check superfluous, because non-zeroness is ensured by the name check. --- extensions/pknock/libxt_pknock.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/extensions/pknock/libxt_pknock.c b/extensions/pknock/libxt_pknock.c index 081f792..11318fa 100644 --- a/extensions/pknock/libxt_pknock.c +++ b/extensions/pknock/libxt_pknock.c @@ -206,9 +206,6 @@ static int pknock_mt_parse(int c, char **argv, int invert, unsigned int *flags, static void pknock_mt_check(unsigned int flags) { - if (!flags) - xtables_error(PARAMETER_PROBLEM, PKNOCK "expection an option.\n"); - if (!(flags & XT_PKNOCK_NAME)) xtables_error(PARAMETER_PROBLEM, PKNOCK "--name option is required.\n");