From patchwork Thu Jul 4 12:24:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kurt Kanzenbach X-Patchwork-Id: 1127508 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 45fccy5fd0z9sPH for ; Thu, 4 Jul 2019 22:25:22 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727849AbfGDMZK (ORCPT ); Thu, 4 Jul 2019 08:25:10 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:58917 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727843AbfGDMZI (ORCPT ); Thu, 4 Jul 2019 08:25:08 -0400 Received: from [5.158.153.52] (helo=kurt.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1hj0nP-00025J-29; Thu, 04 Jul 2019 14:25:03 +0200 From: Kurt Kanzenbach To: Stephen Hemminger Cc: netdev@vger.kernel.org, Kurt Kanzenbach Subject: [PATCH iproute2 1/1] utils: Fix get_s64() function Date: Thu, 4 Jul 2019 14:24:27 +0200 Message-Id: <20190704122427.22256-2-kurt@linutronix.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190704122427.22256-1-kurt@linutronix.de> References: <20190704122427.22256-1-kurt@linutronix.de> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org get_s64() uses internally strtoll() to parse the value out of a given string. strtoll() returns a long long. However, the intermediate variable is long only which might be 32 bit on some systems. So, fix it. Signed-off-by: Kurt Kanzenbach --- lib/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.c b/lib/utils.c index be0f11b00280..9c3702fd4a04 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -390,7 +390,7 @@ int get_u8(__u8 *val, const char *arg, int base) int get_s64(__s64 *val, const char *arg, int base) { - long res; + long long res; char *ptr; errno = 0;