From patchwork Sat Jun 4 10:40:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 1037 Return-Path: Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id A7E611541CF for ; Sat, 4 Jun 2011 12:40:46 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@narfation.org; dkim-adsp=pass Received: from sven-desktop.home.narfation.org (i59F6D227.versanet.de [89.246.210.39]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id C4D4B940E8; Sat, 4 Jun 2011 12:41:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=mail; t=1307184074; bh=Dj5ro7Y8a31TXAqavALrTsgOQX6Pis8ObSh+jfnaNGg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=GRsjNtcn4bXvQ8ES+TSCB0s+2V14W9TJ1oxQlLA2pmnig2qb1f2MqpDpfcj0KB1NY jPjhKBQIYNuarAfyWnkBwJNCcji4D6Zu/BcsvS8NOBfx8BNylxION3r4uizYg6cdf2 nMXmmPCtphWDs1vRaiXbHUQ5Cvs2ZnfdyKaubeWY= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sat, 4 Jun 2011 12:40:38 +0200 Message-Id: <1307184038-32426-2-git-send-email-sven@narfation.org> X-Mailer: git-send-email 1.7.5.3 In-Reply-To: <1307184038-32426-1-git-send-email-sven@narfation.org> References: <1307184038-32426-1-git-send-email-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Fix signedness problem in parse_gw_bandwidth X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jun 2011 10:40:46 -0000 strict_strtoul as used in parse_gw_bandwidth is defined for unsigned long and strict_strtol should be used instead for long. Signed-off-by: Sven Eckelmann --- gateway_common.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gateway_common.c b/gateway_common.c index ed3bd36..e74307b 100644 --- a/gateway_common.c +++ b/gateway_common.c @@ -97,7 +97,7 @@ static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff, *tmp_ptr = '\0'; } - ret = strict_strtoul(buff, 10, &ldown); + ret = strict_strtol(buff, 10, &ldown); if (ret) { bat_err(net_dev, "Download speed of gateway mode invalid: %s\n", @@ -122,7 +122,7 @@ static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff, *tmp_ptr = '\0'; } - ret = strict_strtoul(slash_ptr + 1, 10, &lup); + ret = strict_strtol(slash_ptr + 1, 10, &lup); if (ret) { bat_err(net_dev, "Upload speed of gateway mode invalid: "