]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
tipc: Eliminate a test for negative unsigned quantities
authorAllan Stephens <allan.stephens@windriver.com>
Thu, 3 Nov 2011 17:15:10 +0000 (13:15 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 24 Feb 2012 22:05:15 +0000 (17:05 -0500)
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>
net/tipc/bearer.c

index 329fb659fae4c2b89d4c0830466dab297906dc8c..5f5e89e12fcf8290cb42393e4d61ebf1164cb87f 100644 (file)
@@ -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;