netfilter: ftp: Remove the useless code
authorGao Feng <fgao@ikuai8.com>
Thu, 1 Sep 2016 10:59:02 +0000 (18:59 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 7 Sep 2016 08:38:00 +0000 (10:38 +0200)
There are some debug code which are commented out in find_pattern by #if 0.
Now remove them.

Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_ftp.c

index d49a2d4108132b67ac3a7ade769f498c741866a1..e3ed200608788bc5e8dc96a14b8674d0fbaa7d4b 100644 (file)
@@ -309,19 +309,8 @@ static int find_pattern(const char *data, size_t dlen,
                else return 0;
        }
 
-       if (strncasecmp(data, pattern, plen) != 0) {
-#if 0
-               size_t i;
-
-               pr_debug("ftp: string mismatch\n");
-               for (i = 0; i < plen; i++) {
-                       pr_debug("ftp:char %u `%c'(%u) vs `%c'(%u)\n",
-                                i, data[i], data[i],
-                                pattern[i], pattern[i]);
-               }
-#endif
+       if (strncasecmp(data, pattern, plen) != 0)
                return 0;
-       }
 
        pr_debug("Pattern matches!\n");
        /* Now we've found the constant string, try to skip