Skip to contentSkip to conversation

Fix useless test: int > INT_MAX

PATCH New Nicolas de Pesloüan 1 participant 1 message Aug 22, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix useless test: int > INT_MAX

max_bonds is of type int and cannot be greater than INT_MAX.

---
 drivers/net/bonding/bond_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/bonding/bond_main.c +1 -1
index 4798d30..edd71a1 100644
@@ -4755,7 +4755,7 @@ static int bond_check_params(struct bond_params *params)
 		params->ad_select = BOND_AD_STABLE;
 	}
 
-	if (max_bonds < 0 || max_bonds > INT_MAX) {
+	if (max_bonds < 0) {
 		pr_warning(DRV_NAME
 		       ": Warning: max_bonds (%d) not in range %d-%d, so it "
 		       "was reset to BOND_DEFAULT_MAX_BONDS (%d)\n",