diff options
author | Eric Dumazet <edumazet@google.com> | 2012-05-18 14:57:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-19 01:08:16 -0400 |
commit | a50feda546ac03415707a9bbcac8d6b20714db21 (patch) | |
tree | 3c1f5d64399e713c97545ca39984d4d2efe6ca5d /net/ipv6/ip6_flowlabel.c | |
parent | 32e9072b92a1c556a303d8d0e0d64feb667e601d (diff) |
ipv6: bool/const conversions phase2
Mostly bool conversions, some inline removals and const additions.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_flowlabel.c')
-rw-r--r-- | net/ipv6/ip6_flowlabel.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index cb43df690210..9772fbd8a3f5 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c | |||
@@ -433,32 +433,32 @@ static int mem_check(struct sock *sk) | |||
433 | return 0; | 433 | return 0; |
434 | } | 434 | } |
435 | 435 | ||
436 | static int ipv6_hdr_cmp(struct ipv6_opt_hdr *h1, struct ipv6_opt_hdr *h2) | 436 | static bool ipv6_hdr_cmp(struct ipv6_opt_hdr *h1, struct ipv6_opt_hdr *h2) |
437 | { | 437 | { |
438 | if (h1 == h2) | 438 | if (h1 == h2) |
439 | return 0; | 439 | return false; |
440 | if (h1 == NULL || h2 == NULL) | 440 | if (h1 == NULL || h2 == NULL) |
441 | return 1; | 441 | return true; |
442 | if (h1->hdrlen != h2->hdrlen) | 442 | if (h1->hdrlen != h2->hdrlen) |
443 | return 1; | 443 | return true; |
444 | return memcmp(h1+1, h2+1, ((h1->hdrlen+1)<<3) - sizeof(*h1)); | 444 | return memcmp(h1+1, h2+1, ((h1->hdrlen+1)<<3) - sizeof(*h1)); |
445 | } | 445 | } |
446 | 446 | ||
447 | static int ipv6_opt_cmp(struct ipv6_txoptions *o1, struct ipv6_txoptions *o2) | 447 | static bool ipv6_opt_cmp(struct ipv6_txoptions *o1, struct ipv6_txoptions *o2) |
448 | { | 448 | { |
449 | if (o1 == o2) | 449 | if (o1 == o2) |
450 | return 0; | 450 | return false; |
451 | if (o1 == NULL || o2 == NULL) | 451 | if (o1 == NULL || o2 == NULL) |
452 | return 1; | 452 | return true; |
453 | if (o1->opt_nflen != o2->opt_nflen) | 453 | if (o1->opt_nflen != o2->opt_nflen) |
454 | return 1; | 454 | return true; |
455 | if (ipv6_hdr_cmp(o1->hopopt, o2->hopopt)) | 455 | if (ipv6_hdr_cmp(o1->hopopt, o2->hopopt)) |
456 | return 1; | 456 | return true; |
457 | if (ipv6_hdr_cmp(o1->dst0opt, o2->dst0opt)) | 457 | if (ipv6_hdr_cmp(o1->dst0opt, o2->dst0opt)) |
458 | return 1; | 458 | return true; |
459 | if (ipv6_hdr_cmp((struct ipv6_opt_hdr *)o1->srcrt, (struct ipv6_opt_hdr *)o2->srcrt)) | 459 | if (ipv6_hdr_cmp((struct ipv6_opt_hdr *)o1->srcrt, (struct ipv6_opt_hdr *)o2->srcrt)) |
460 | return 1; | 460 | return true; |
461 | return 0; | 461 | return false; |
462 | } | 462 | } |
463 | 463 | ||
464 | static inline void fl_link(struct ipv6_pinfo *np, struct ipv6_fl_socklist *sfl, | 464 | static inline void fl_link(struct ipv6_pinfo *np, struct ipv6_fl_socklist *sfl, |