Return-Path: From: Sven Eckelmann Date: Sun, 13 Sep 2015 09:44:45 +0200 Message-Id: <1442130285-3725-1-git-send-email-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH v2] batman-adv: Place constant on right side of comparison List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: b.a.t.m.a.n@lists.open-mesh.org checkpatch warns when the constant is on the left side of a comparison. Fixes: 56fd0bab9c18 ("batman-adv: Fix gw_bandwidth calculation on 32 bit systems") Signed-off-by: Sven Eckelmann --- v2: fix stupid error in the commit message net/batman-adv/gateway_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/batman-adv/gateway_common.c b/net/batman-adv/gateway_common.c index 0cb5e6b..66d9514 100644 --- a/net/batman-adv/gateway_common.c +++ b/net/batman-adv/gateway_common.c @@ -89,7 +89,7 @@ static bool batadv_parse_gw_bandwidth(struct net_device *net_dev, char *buff, break; } - if (U32_MAX < ldown) { + if (ldown > U32_MAX) { batadv_err(net_dev, "Download speed of gateway mode too large: %s\n", buff); @@ -139,7 +139,7 @@ static bool batadv_parse_gw_bandwidth(struct net_device *net_dev, char *buff, break; } - if (U32_MAX < lup) { + if (lup > U32_MAX) { batadv_err(net_dev, "Upload speed of gateway mode too large: %s\n", slash_ptr + 1); -- 2.5.1