diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2011-11-03 17:15:10 (GMT) |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-02-24 22:05:15 (GMT) |
commit | 9efde4a0bd2f21dec0c7b40da2bf2c3e189e98e2 (patch) | |
tree | 515b34e7b3939774f54118bbad14e3c867023ffe /net | |
parent | 732efba4d77e1b0857984c401a7b18784f51b075 (diff) | |
download | linux-9efde4a0bd2f21dec0c7b40da2bf2c3e189e98e2.tar.xz |
tipc: Eliminate a test for negative unsigned quantities
Simplifies a comparison operation to eliminate a useless test that
checks if an unsigned value is less than zero.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/tipc/bearer.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 329fb65..5f5e89e 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c @@ -456,8 +456,7 @@ int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority) warn("Bearer <%s> rejected, illegal discovery domain\n", name); return -EINVAL; } - if ((priority < TIPC_MIN_LINK_PRI || - priority > TIPC_MAX_LINK_PRI) && + if ((priority > TIPC_MAX_LINK_PRI) && (priority != TIPC_MEDIA_LINK_PRI)) { warn("Bearer <%s> rejected, illegal priority\n", name); return -EINVAL; |