[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190704122427.22256-2-kurt@linutronix.de>
Date: Thu, 4 Jul 2019 14:24:27 +0200
From: Kurt Kanzenbach <kurt@...utronix.de>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org, Kurt Kanzenbach <kurt@...utronix.de>
Subject: [PATCH iproute2 1/1] utils: Fix get_s64() function
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 <kurt@...utronix.de>
---
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;
--
2.11.0
Powered by blists - more mailing lists