Skip to content

Commit ddb075b

Browse files
gfreewindummakynes
authored andcommitted
netfilter: ftp: Remove the useless code
There are some debug code which are commented out in find_pattern by #if 0. Now remove them. Signed-off-by: Gao Feng <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 723eb29 commit ddb075b

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

net/netfilter/nf_conntrack_ftp.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -309,19 +309,8 @@ static int find_pattern(const char *data, size_t dlen,
309309
else return 0;
310310
}
311311

312-
if (strncasecmp(data, pattern, plen) != 0) {
313-
#if 0
314-
size_t i;
315-
316-
pr_debug("ftp: string mismatch\n");
317-
for (i = 0; i < plen; i++) {
318-
pr_debug("ftp:char %u `%c'(%u) vs `%c'(%u)\n",
319-
i, data[i], data[i],
320-
pattern[i], pattern[i]);
321-
}
322-
#endif
312+
if (strncasecmp(data, pattern, plen) != 0)
323313
return 0;
324-
}
325314

326315
pr_debug("Pattern matches!\n");
327316
/* Now we've found the constant string, try to skip

0 commit comments

Comments
 (0)