Skip to content

Commit

Permalink
tipc: Eliminate a test for negative unsigned quantities
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Allan Stephens authored and Paul Gortmaker committed Feb 24, 2012
1 parent 732efba commit 9efde4a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/tipc/bearer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9efde4a

Please sign in to comment.