From: Kurt Kanzenbach Date: Thu, 4 Jul 2019 12:24:27 +0000 (+0200) Subject: utils: Fix get_s64() function X-Git-Tag: v5.3.0~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c875433b145e33645798ecfe4d99bcb28c80d1e9;p=thirdparty%2Fiproute2.git 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 Signed-off-by: Stephen Hemminger --- diff --git a/lib/utils.c b/lib/utils.c index 9ea21fa16..4c43f8fd7 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -374,7 +374,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;