Message ID | 20190704122427.22256-2-kurt@linutronix.de |
---|---|
State | Accepted |
Delegated to: | stephen hemminger |
Headers | show |
Series | Fix s64 argument parsing | expand |
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;
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@linutronix.de> --- lib/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)