diff options
author | Kris Katterjohn <kjak@users.sourceforge.net> | 2006-01-14 01:33:06 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-01-14 01:33:06 +0300 |
commit | 7b11f69fb5c475f521db79f5fa22104e15842671 (patch) | |
tree | 631f15d04fb8306b4ce7031f7a75ed44401e68c3 /net | |
parent | 46b86a2da0fd14bd49765330df63a62279833acb (diff) | |
download | linux-7b11f69fb5c475f521db79f5fa22104e15842671.tar.xz |
[NET]: Clean up comments for sk_chk_filter()
This removes redundant comments, and moves one comment to a better
location.
Signed-off-by: Kris Katterjohn <kjak@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/filter.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index 9eb9d0017a01..a52665f75224 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -287,7 +287,9 @@ load_b: * no references or jumps that are out of range, no illegal * instructions, and must end with a RET instruction. * - * Returns 0 if the rule set is legal or a negative errno code if not. + * All jumps are forward as they are not signed. + * + * Returns 0 if the rule set is legal or -EINVAL if not. */ int sk_chk_filter(struct sock_filter *filter, int flen) { @@ -299,7 +301,6 @@ int sk_chk_filter(struct sock_filter *filter, int flen) /* check the filter code now */ for (pc = 0; pc < flen; pc++) { - /* all jumps are forward as they are not signed */ ftest = &filter[pc]; /* Only allow valid instructions */ @@ -383,11 +384,6 @@ int sk_chk_filter(struct sock_filter *filter, int flen) } } - /* - * The program must end with a return. We don't care where they - * jumped within the script (its always forwards) but in the end - * they _will_ hit this. - */ return (BPF_CLASS(filter[flen - 1].code) == BPF_RET) ? 0 : -EINVAL; } |