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>
This commit is contained in:
Allan Stephens 2011-11-03 13:15:10 -04:00 коммит произвёл Paul Gortmaker
Родитель 732efba4d7
Коммит 9efde4a0bd
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -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); warn("Bearer <%s> rejected, illegal discovery domain\n", name);
return -EINVAL; return -EINVAL;
} }
if ((priority < TIPC_MIN_LINK_PRI || if ((priority > TIPC_MAX_LINK_PRI) &&
priority > TIPC_MAX_LINK_PRI) &&
(priority != TIPC_MEDIA_LINK_PRI)) { (priority != TIPC_MEDIA_LINK_PRI)) {
warn("Bearer <%s> rejected, illegal priority\n", name); warn("Bearer <%s> rejected, illegal priority\n", name);
return -EINVAL; return -EINVAL;