diff options
author | Kris Katterjohn <kjak@users.sourceforge.net> | 2006-01-17 05:25:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-01-17 05:25:52 -0500 |
commit | e35bedf369b17120dbd7d554bee45407a3825267 (patch) | |
tree | 5ac5aa1c71c0e2d349a13b9103147c0346129326 /net/core | |
parent | dd914b4082cfbe28849898a0a98757827829c813 (diff) |
[NET]: Fix whitespace issues in net/core/filter.c
This fixes some whitespace issues in net/core/filter.c
Signed-off-by: Kris Katterjohn <kjak@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/filter.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index a52665f75224..9540946a48f3 100644 --- a/net/core/filter.c +++ b/net/core/filter.c | |||
@@ -74,7 +74,6 @@ static inline void *load_pointer(struct sk_buff *skb, int k, | |||
74 | * filtering, filter is the array of filter instructions, and | 74 | * filtering, filter is the array of filter instructions, and |
75 | * len is the number of filter blocks in the array. | 75 | * len is the number of filter blocks in the array. |
76 | */ | 76 | */ |
77 | |||
78 | unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen) | 77 | unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen) |
79 | { | 78 | { |
80 | struct sock_filter *fentry; /* We walk down these */ | 79 | struct sock_filter *fentry; /* We walk down these */ |
@@ -175,7 +174,7 @@ unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int | |||
175 | continue; | 174 | continue; |
176 | case BPF_LD|BPF_W|BPF_ABS: | 175 | case BPF_LD|BPF_W|BPF_ABS: |
177 | k = fentry->k; | 176 | k = fentry->k; |
178 | load_w: | 177 | load_w: |
179 | ptr = load_pointer(skb, k, 4, &tmp); | 178 | ptr = load_pointer(skb, k, 4, &tmp); |
180 | if (ptr != NULL) { | 179 | if (ptr != NULL) { |
181 | A = ntohl(*(u32 *)ptr); | 180 | A = ntohl(*(u32 *)ptr); |
@@ -184,7 +183,7 @@ unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int | |||
184 | break; | 183 | break; |
185 | case BPF_LD|BPF_H|BPF_ABS: | 184 | case BPF_LD|BPF_H|BPF_ABS: |
186 | k = fentry->k; | 185 | k = fentry->k; |
187 | load_h: | 186 | load_h: |
188 | ptr = load_pointer(skb, k, 2, &tmp); | 187 | ptr = load_pointer(skb, k, 2, &tmp); |
189 | if (ptr != NULL) { | 188 | if (ptr != NULL) { |
190 | A = ntohs(*(u16 *)ptr); | 189 | A = ntohs(*(u16 *)ptr); |
@@ -374,7 +373,7 @@ int sk_chk_filter(struct sock_filter *filter, int flen) | |||
374 | case BPF_JMP|BPF_JSET|BPF_K: | 373 | case BPF_JMP|BPF_JSET|BPF_K: |
375 | case BPF_JMP|BPF_JSET|BPF_X: | 374 | case BPF_JMP|BPF_JSET|BPF_X: |
376 | /* for conditionals both must be safe */ | 375 | /* for conditionals both must be safe */ |
377 | if (pc + ftest->jt + 1 >= flen || | 376 | if (pc + ftest->jt + 1 >= flen || |
378 | pc + ftest->jf + 1 >= flen) | 377 | pc + ftest->jf + 1 >= flen) |
379 | return -EINVAL; | 378 | return -EINVAL; |
380 | break; | 379 | break; |
@@ -384,7 +383,7 @@ int sk_chk_filter(struct sock_filter *filter, int flen) | |||
384 | } | 383 | } |
385 | } | 384 | } |
386 | 385 | ||
387 | return (BPF_CLASS(filter[flen - 1].code) == BPF_RET) ? 0 : -EINVAL; | 386 | return (BPF_CLASS(filter[flen - 1].code) == BPF_RET) ? 0 : -EINVAL; |
388 | } | 387 | } |
389 | 388 | ||
390 | /** | 389 | /** |
@@ -404,8 +403,8 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk) | |||
404 | int err; | 403 | int err; |
405 | 404 | ||
406 | /* Make sure new filter is there and in the right amounts. */ | 405 | /* Make sure new filter is there and in the right amounts. */ |
407 | if (fprog->filter == NULL) | 406 | if (fprog->filter == NULL) |
408 | return -EINVAL; | 407 | return -EINVAL; |
409 | 408 | ||
410 | fp = sock_kmalloc(sk, fsize+sizeof(*fp), GFP_KERNEL); | 409 | fp = sock_kmalloc(sk, fsize+sizeof(*fp), GFP_KERNEL); |
411 | if (!fp) | 410 | if (!fp) |