]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/netfilter/xt_dccp.c
netfilter: xtables: untangle spaghetti if clauses in checkentry
[mv-sheeva.git] / net / netfilter / xt_dccp.c
index 0989f29ade2ea0e559b53e7afac854a2bb09d54a..8f6014f7c8813b97ca638afb4aeb6f779b5a92bd 100644 (file)
@@ -127,9 +127,13 @@ static bool dccp_mt_check(const struct xt_mtchk_param *par)
 {
        const struct xt_dccp_info *info = par->matchinfo;
 
-       return !(info->flags & ~XT_DCCP_VALID_FLAGS)
-               && !(info->invflags & ~XT_DCCP_VALID_FLAGS)
-               && !(info->invflags & ~info->flags);
+       if (info->flags & ~XT_DCCP_VALID_FLAGS)
+               return false;
+       if (info->invflags & ~XT_DCCP_VALID_FLAGS)
+               return false;
+       if (info->invflags & ~info->flags)
+               return false;
+       return true;
 }
 
 static struct xt_match dccp_mt_reg[] __read_mostly = {