From 9efde4a0bd2f21dec0c7b40da2bf2c3e189e98e2 Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Thu, 3 Nov 2011 13:15:10 -0400 Subject: 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 Signed-off-by: Paul Gortmaker --- net/tipc/bearer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'net/tipc/bearer.c') diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 329fb659fae4..5f5e89e12fcf 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; -- cgit v1.2.3