* [PATCH] Fix useless test: int > INT_MAX
@ 2009-08-22 12:17 Nicolas de Pesloüan
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas de Pesloüan @ 2009-08-22 12:17 UTC (permalink / raw)
To: netdev, bonding-devel; +Cc: Cyril Chaboisseau
max_bonds is of type int and cannot be greater than INT_MAX.
Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
---
drivers/net/bonding/bond_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 4798d30..edd71a1 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -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",
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] Fix useless test: int > INT_MAX
2009-08-28 21:57 ` [PATCH] bonding: use compare_ether_addr Jay Vosburgh
@ 2009-08-28 21:57 ` Jay Vosburgh
0 siblings, 0 replies; 2+ messages in thread
From: Jay Vosburgh @ 2009-08-28 21:57 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Nicolas de Pesloüan
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 887 bytes --]
From: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
max_bonds is of type int and cannot be greater than INT_MAX.
Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
---
drivers/net/bonding/bond_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index ed00ba9..6b9f15b 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4759,7 +4759,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",
--
1.6.0.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-28 21:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-22 12:17 [PATCH] Fix useless test: int > INT_MAX Nicolas de Pesloüan
-- strict thread matches above, loose matches on Subject: below --
2009-08-28 21:57 [PATCH net-next-2.6 0/4] bonding: Four patches Jay Vosburgh
2009-08-28 21:57 ` [PATCH] bonding: propogate vlan_features to bonding master Jay Vosburgh
2009-08-28 21:57 ` [PATCH] bonding: use compare_ether_addr Jay Vosburgh
2009-08-28 21:57 ` [PATCH] Fix useless test: int > INT_MAX Jay Vosburgh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).