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.
This commit is contained in:
Jan Engelhardt
2009-10-12 00:56:55 +02:00
parent 36035d52d3
commit 5284b5db92

View File

@@ -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) static void pknock_mt_check(unsigned int flags)
{ {
if (!flags)
xtables_error(PARAMETER_PROBLEM, PKNOCK "expection an option.\n");
if (!(flags & XT_PKNOCK_NAME)) if (!(flags & XT_PKNOCK_NAME))
xtables_error(PARAMETER_PROBLEM, PKNOCK xtables_error(PARAMETER_PROBLEM, PKNOCK
"--name option is required.\n"); "--name option is required.\n");